From 01cdd8e432712c2d876cee386db7503edff41867 Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Mon, 7 Mar 2016 19:24:13 +0100 Subject: [PATCH] library/roles/postgresql/tasks/manage_pg_db.yml: Specify the port when talking to postgresql. --- postgresql/tasks/manage_pg_db.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/postgresql/tasks/manage_pg_db.yml b/postgresql/tasks/manage_pg_db.yml index 38f0239..5912573 100644 --- a/postgresql/tasks/manage_pg_db.yml +++ b/postgresql/tasks/manage_pg_db.yml @@ -2,7 +2,7 @@ - name: Add a user for the postgresql DBs become: True become_user: postgres - postgresql_user: user={{ item.user }} password={{ item.pwd }} role_attr_flags={{ item.roles }} + postgresql_user: user={{ item.user }} password={{ item.pwd }} role_attr_flags={{ item.roles }} port={{ psql_db_port }} with_items: '{{ psql_db_data }}' when: - psql_db_data is defined @@ -12,7 +12,7 @@ - name: Add the databases with the correct owner become: True become_user: postgres - postgresql_db: db={{ item.name }} encoding={{ item.encoding }} owner={{ item.user }} template=template0 state=present + postgresql_db: db={{ item.name }} port={{ psql_db_port }} encoding={{ item.encoding }} owner={{ item.user }} template=template0 state=present with_items: '{{ psql_db_data }}' when: - psql_db_data is defined @@ -22,7 +22,7 @@ - name: Add postgres extensions to the databases, if needed become: True become_user: postgres - postgresql_ext: name={{ item.1 }} db={{ item.0.name }} + postgresql_ext: name={{ item.1 }} db={{ item.0.name }} port={{ psql_db_port }} with_subelements: - '{{ psql_db_data | default ([]) }}' - extensions