library/roles/postgresql/tasks/configure-access.yml: Add the pg_db tags to the tasks that set pg_hba.conf.

This commit is contained in:
Andrea Dell'Amico 2017-04-10 11:45:40 +02:00
parent efcb034589
commit f7ce869b01
1 changed files with 3 additions and 3 deletions

View File

@ -10,7 +10,7 @@
- item.1 is defined - item.1 is defined
- not psql_force_ssl_client_connection - not psql_force_ssl_client_connection
notify: Reload postgresql notify: Reload postgresql
tags: [ 'postgresql', 'postgres', 'pg_hba' ] tags: [ 'postgresql', 'postgres', 'pg_hba', 'pg_db' ]
- name: Give access to the remote postgresql client, force ssl - name: Give access to the remote postgresql client, force ssl
lineinfile: name={{ psql_conf_dir }}/pg_hba.conf regexp="^host.* {{ item.0.name }} {{ item.0.user }} {{ item.1 }}.*$" line="hostssl {{ item.0.name }} {{ item.0.user }} {{ item.1 }} md5" lineinfile: name={{ psql_conf_dir }}/pg_hba.conf regexp="^host.* {{ item.0.name }} {{ item.0.user }} {{ item.1 }}.*$" line="hostssl {{ item.0.name }} {{ item.0.user }} {{ item.1 }} md5"
@ -23,13 +23,13 @@
- item.1 is defined - item.1 is defined
- psql_force_ssl_client_connection - psql_force_ssl_client_connection
notify: Reload postgresql notify: Reload postgresql
tags: [ 'postgresql', 'postgres', 'pg_hba' ] tags: [ 'postgresql', 'postgres', 'pg_hba', 'pg_db' ]
# No conditionals, it is needed to perform base backups when the WAL archive is active # No conditionals, it is needed to perform base backups when the WAL archive is active
- name: Give local access with replication privileges to the postgres user - name: Give local access with replication privileges to the postgres user
lineinfile: name={{ psql_conf_dir }}/pg_hba.conf regexp="^local replication postgres peer" line="local replication postgres peer" lineinfile: name={{ psql_conf_dir }}/pg_hba.conf regexp="^local replication postgres peer" line="local replication postgres peer"
notify: Reload postgresql notify: Reload postgresql
tags: [ 'postgresql', 'postgres', 'pg_hba' ] tags: [ 'postgresql', 'postgres', 'pg_hba', 'pg_db' ]
- name: Set the postgresql listen port - name: Set the postgresql listen port
action: configfile path={{ psql_conf_dir }}/postgresql.conf key=port value="{{ psql_db_port }}" action: configfile path={{ psql_conf_dir }}/postgresql.conf key=port value="{{ psql_db_port }}"