LoginSignup
1
1

More than 5 years have passed since last update.

ソースからインストールした postrgeSQL で ansible postgresql_db が動かない

Posted at

yum などではなくソースから make/make install した PostgreSQL で、ansible の postgresql_db モジュールを使うと、エラーが出て動きません。

fatal: [192.168.33.21]: FAILED! => {"changed": false, "failed": true, "msg": "unable to connect to database: サーバに接続できませんでした: そのようなファイルやディレクトリはありません\n                              ローカルにサーバが稼動していますか?\n                              Unixドメインソケット\"/var/run/postgresql/.s.PGSQL.5432\"で通信を受け付けていますか?\n"}

ソースからインストールした場合は /tmp に .s.PGSQL.5432 があるので、
login_unix_socket を設定してやると動く

  postgresql_db: >
    name=mydb
    login_user=postgres
    login_unix_socket=/tmp/
    encoding=UTF-8
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1