pdns-ansible
pdns-ansible copied to clipboard
add pgsql backend
the changes require the postgres user to be able to connec to the database via localhost using password, peer authentication would require using become. This may require changes to pg_hba.conf and setting a postgres user password:
- name: PostgreSQL | pg_hba.conf
community.postgresql.postgresql_pg_hba:
dest: /etc/postgresql/13/main/pg_hba.conf
contype: host
users: postgres
source: "{{item}}"
databases: ALL
method: md5
create: true
loop: ["::1/128","127.0.0.1/32"]
- name: PostgreSQL | postgres password
become: yes
become_user: postgres
community.postgresql.postgresql_user:
user: postgres
password: "{{ pgsql_root_password }}"
login_unix_socket: /var/run/postgresql
Sweet! If you could add some tests, I'll happily merge it :)
when will that be merged?
I've created a new PR that includes these changes and some tests.
https://github.com/PowerDNS/pdns-ansible/pull/211