Closed fblackburn1 closed 11 months ago
Same issue here.
Using Version 3.3.1 helps!
Same as @dcardellino here.
Update: In my case it was because the variable postgresql_global_config_options got facts set in another role, overwriting the variable set in this role.
https://github.com/pulp/pulp_installer/issues/1242#issuecomment-1182983131
---
- hosts: db
become: yes
pre_tasks:
- name: Update repositories cache
apt:
update_cache: yes
roles:
- role: geerlingguy.postgresql
vars:
postgresql_users:
- name: vagrant
password: vagrant
postgresql_databases:
- name: books
owner: vagrant
postgresql_hba_entries:
- { type: host, database: all, user: all, address: '0.0.0.0/0', auth_method: md5 }
postgresql_global_config_options:
- option: listen_addresses
value: '*'
This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!
Please read this blog post to see the reasons why I mark issues as stale.
--- - hosts: db become: yes pre_tasks: - name: Update repositories cache apt: update_cache: yes roles: - role: geerlingguy.postgresql vars: postgresql_users: - name: vagrant password: vagrant postgresql_databases: - name: books owner: vagrant postgresql_hba_entries: - { type: host, database: all, user: all, address: '0.0.0.0/0', auth_method: md5 } postgresql_global_config_options: - option: listen_addresses value: '*'
I had the same issue, so just put the log_directory
param in there as well, same value as the default
That seems to make it happy
This issue is no longer marked for closure.
Still actual
Still actual
indeed check my solution above, perhaps it works for you as well
Still actual
indeed check my solution above, perhaps it works for you as well
Of course, I have no problem finding the workaround. This issue should be investigated and fixed in this repository.
I agree :)
On Mon, Mar 20, 2023 at 6:51 PM pavlozt @.***> wrote:
Still actual
indeed check my solution above, perhaps it works for you as well
Of course, I have no problem finding the workaround. This issue should be investigated and fixed in this repository.
— Reply to this email directly, view it on GitHub https://github.com/geerlingguy/ansible-role-postgresql/issues/217#issuecomment-1476762598, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALFYCRHJI564MXJW2Y4VED3W5CRKJANCNFSM53IQTXGQ . You are receiving this because you commented.Message ID: @.***>
Can somebody help me, this is my playbook. I still get the same error:
- hosts: database
become: yes
pre_tasks:
- name: Update repositories cache
apt:
update_cache: yes
roles:
- role: geerlingguy.postgresql
vars:
postgresql_restarted_state: "restarted"
postgresql_service_state: started
postgresql_service_enabled: true
postgresql_auth_method: 'scram-sha-256'
postgresql_hba_entries:
- {type: local, database: all, user: postgres, auth_method: peer}
- {type: local, database: all, user: all, auth_method: peer}
- {type: host, database: all, user: all, address: '127.0.0.1/32', auth_method: "scram-sha-256"}
- {type: host, database: all, user: all, address: '::1/128', auth_method: "scram-sha-256"}
- {type: host, database: all, user: all, address: '0.0.0.0/0', auth_method: "scram-sha-256"}
- {type: host, database: all, user: all, address: '::/0', auth_method: "scram-sha-256"}
postgresql_global_config_options:
- option: listen_addresses
value: '*'
- name: Open Postgres Port
hosts: database
tasks:
- name: Allow Postgres
community.general.ufw:
rule: allow
port: "5432"
proto: tcp
Hi,
You are missing the log_directory variable that you can find under defaults:
postgresql_global_config_options:
If you override the postgresql_global_config_options variable, you will need to also include the log_directory and it's value
On Tue, May 16, 2023, 06:04 Malte Kiefer @.***> wrote:
Can somebody help me, this is my playbook. I still get the same error:
hosts: database become: yes pre_tasks:
- name: Update repositories cache apt: update_cache: yes roles:
- role: geerlingguy.postgresql vars: postgresql_restarted_state: "restarted" postgresql_service_state: started postgresql_service_enabled: true postgresql_auth_method: 'scram-sha-256' postgresql_hba_entries:
- {type: local, database: all, user: postgres, auth_method: peer}
- {type: local, database: all, user: all, auth_method: peer}
- {type: host, database: all, user: all, address: '127.0.0.1/32', auth_method: "scram-sha-256"}
- {type: host, database: all, user: all, address: '::1/128', auth_method: "scram-sha-256"}
- {type: host, database: all, user: all, address: '0.0.0.0/0', auth_method: "scram-sha-256"}
- {type: host, database: all, user: all, address: '::/0', auth_method: "scram-sha-256"} postgresql_global_config_options:
- option: listen_addresses value: '*'
name: Open Postgres Port hosts: database tasks:
- name: Allow Postgres community.general.ufw: rule: allow port: "5432" proto: tcp
— Reply to this email directly, view it on GitHub https://github.com/geerlingguy/ansible-role-postgresql/issues/217#issuecomment-1548947335, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGKKOYWYXLV6PFI5W3BYWULXGL4EPANCNFSM53IQTXGQ . You are receiving this because you commented.Message ID: @.***>
After adding the option: log_directory, it kinda works! I get the following error and I need to restart postgresql manually TASK [geerlingguy.postgresql : Ensure PostgreSQL users are present.] ***** failed: [208.83.232.178] (item=None) => {"censored": "the output has been hidden due to the fact that 'no_log: true' was specified for this result", "changed": false} fatal: [208.83.232.178]: FAILED! => {"censored": "the output has been hidden due to the fact that 'no_log: true' was specified for this result", "changed": false}
This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!
Please read this blog post to see the reasons why I mark issues as stale.
This issue has been closed due to inactivity. If you feel this is in error, please reopen the issue or file a new issue with the relevant details.
Given I use the latest ansible-role-postgres (3.4.0) Given I override
postgresql_global_config_options
variable (but notlog_directory
option) When I execute my playbook Then I get the following error:Workaround: define
log_directory
inside my custompostgresql_global_config_options
variable Expected: No need to definelog_directory
optionPlaybook: