From f7ce869b011a99fc00597ffd379085970db53f0b Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Mon, 10 Apr 2017 11:45:40 +0200 Subject: [PATCH] library/roles/postgresql/tasks/configure-access.yml: Add the pg_db tags to the tasks that set pg_hba.conf. --- postgresql/tasks/configure-access.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/postgresql/tasks/configure-access.yml b/postgresql/tasks/configure-access.yml index 89e481b9..1d073ba9 100644 --- a/postgresql/tasks/configure-access.yml +++ b/postgresql/tasks/configure-access.yml @@ -10,7 +10,7 @@ - item.1 is defined - not psql_force_ssl_client_connection 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 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 - psql_force_ssl_client_connection 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 - 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" notify: Reload postgresql - tags: [ 'postgresql', 'postgres', 'pg_hba' ] + tags: [ 'postgresql', 'postgres', 'pg_hba', 'pg_db' ] - name: Set the postgresql listen port action: configfile path={{ psql_conf_dir }}/postgresql.conf key=port value="{{ psql_db_port }}"