ANXS / postgresql

Fairly full featured Ansible role for Postgresql.
http://anxs.io/
MIT License
849 stars 573 forks source link

added user-host to pg_hba #436

Closed mprenditore closed 4 months ago

mprenditore commented 5 years ago

In order to improve security and limit some users to access from specific IPs only, I've added the possibility to specify a list of host per each username.

If you think it's a good idea we can implement that functionality to the original variable postgresql_pg_hba_passwd_hosts and put some logic in the Jinja template to act differently if it's a list or a dict to maintain backward compatibility instead of adding a new variable like in that case.

Let me know what do you think about it.

Cheers

gclough commented 5 years ago

Needs work:

TASK [ANXS.postgresql : PostgreSQL | Update configuration - pt. 1 (pg_hba.conf)] ***
fatal: [postgresql-9.4]: FAILED! => {"changed": false, "failed": true, "msg": "AnsibleUndefinedVariable: 'postgresql_pg_hba_passwd_hosts_per_user' is undefined"}
fatal: [postgresql-9.5]: FAILED! => {"changed": false, "failed": true, "msg": "AnsibleUndefinedVariable: 'postgresql_pg_hba_passwd_hosts_per_user' is undefined"}
fatal: [postgresql-10]: FAILED! => {"changed": false, "failed": true, "msg": "AnsibleUndefinedVariable: 'postgresql_pg_hba_passwd_hosts_per_user' is undefined"}
fatal: [postgresql-9.6]: FAILED! => {"changed": false, "failed": true, "msg": "AnsibleUndefinedVariable: 'postgresql_pg_hba_passwd_hosts_per_user' is undefined"}
fatal: [postgresql-11]: FAILED! => {"changed": false, "failed": true, "msg": "AnsibleUndefinedVariable: 'postgresql_pg_hba_passwd_hosts_per_user' is undefined"}
mprenditore commented 5 years ago

Fixed the typo in the variable name

github-actions[bot] commented 6 months ago

This pr 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!

github-actions[bot] commented 4 months ago

This pr 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.