Postgres doesn't allow connections via hostname
This role needs to delegate the database tasks to a database host - which sometimes is the same host that runs Zammad (delegate_to: localhost doesn't work because it wants to run the tasks at the Ansible controler) We need to distinguish between the database_host and the zammad_database_host The later one can be set to 127.0.0.1 to allow local database connections without using the hostname
This commit is contained in:
parent
b84f1bb81f
commit
eb0c35701b
2 changed files with 2 additions and 1 deletions
|
@ -16,6 +16,7 @@ ruby_build_repo: https://github.com/rbenv/ruby-build.git
|
||||||
zammad_database_name: zammad
|
zammad_database_name: zammad
|
||||||
zammad_database_password: "{{ lookup('ansible.builtin.password', '/tmp/zammad_database_pwd length=42 chars=ascii_letters,digits') }}"
|
zammad_database_password: "{{ lookup('ansible.builtin.password', '/tmp/zammad_database_pwd length=42 chars=ascii_letters,digits') }}"
|
||||||
zammad_database_user: zammad
|
zammad_database_user: zammad
|
||||||
|
zammad_database_host: "{{ database_host }}"
|
||||||
zammad_database_configuration: "{{ zammad_home }}/config/database.yml"
|
zammad_database_configuration: "{{ zammad_home }}/config/database.yml"
|
||||||
zammad_env_file: /etc/zammad/zammad.env
|
zammad_env_file: /etc/zammad/zammad.env
|
||||||
zammad_home: /opt/zammad
|
zammad_home: /opt/zammad
|
||||||
|
|
|
@ -5,7 +5,7 @@ default: &default
|
||||||
adapter: postgresql
|
adapter: postgresql
|
||||||
username: {{ zammad_database_user }}
|
username: {{ zammad_database_user }}
|
||||||
password: {{ zammad_database_password }}
|
password: {{ zammad_database_password }}
|
||||||
host: {{ database_host }}
|
host: {{ zammad_database_host }}
|
||||||
|
|
||||||
production:
|
production:
|
||||||
<<: *default
|
<<: *default
|
||||||
|
|
Loading…
Reference in a new issue