From fc7aaeab433803988eaa5d3ef1983d18d6a63a47 Mon Sep 17 00:00:00 2001 From: Emilien Escalle Date: Wed, 31 Mar 2021 19:21:40 +0200 Subject: [PATCH] Fix error when port is not the default one If we configure another port than the default one, the check of the users fails because ansible cannot connect to postgresql. We must provide conneciton configration to this task too --- tasks/users.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tasks/users.yml b/tasks/users.yml index 4d346a9..6cbae01 100644 --- a/tasks/users.yml +++ b/tasks/users.yml @@ -3,6 +3,11 @@ postgresql_user: name: "{{ item.name }}" password: "{{ item.password | default(omit) }}" + login_host: "{{ item.login_host | default('localhost') }}" + login_password: "{{ item.login_password | default(omit) }}" + login_user: "{{ item.login_user | default(postgresql_user) }}" + login_unix_socket: "{{ item.login_unix_socket | default(postgresql_unix_socket_directories[0]) }}" + port: "{{ item.port | default(omit) }}" with_items: "{{ postgresql_users }}" no_log: "{{ postgres_users_no_log }}" become: true