From 499e9027193d5ca039a16a3ba01a6e2602af0aec Mon Sep 17 00:00:00 2001 From: Alfredo Deza Date: Mon, 5 Mar 2018 12:05:43 -0500 Subject: [PATCH] shaman-pull-requests allow users to connect locally over ipv6 sans password Signed-off-by: Alfredo Deza --- .../setup/playbooks/tasks/postgresql.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/shaman-pull-requests/setup/playbooks/tasks/postgresql.yml b/shaman-pull-requests/setup/playbooks/tasks/postgresql.yml index 5edd6055..14a9d1bf 100644 --- a/shaman-pull-requests/setup/playbooks/tasks/postgresql.yml +++ b/shaman-pull-requests/setup/playbooks/tasks/postgresql.yml @@ -9,7 +9,7 @@ apt: name: "{{ item }}" state: present - with_items: + with_items: - postgresql - postgresql-common - postgresql-contrib @@ -25,7 +25,18 @@ enabled: yes become: yes -- name: allow users to connect locally +- name: allow users to connect locally (ipv6) + sudo: yes + lineinfile: + # TODO: should not hardcode that version + # 9.3 is available on trusty, 9.5 on Xenial + dest: /etc/postgresql/9.5/main/pg_hba.conf + regexp: '^host\s+all\s+all\s+127.0.0.1/32' + line: 'host all all ::1/128 trust' + backrefs: yes + register: pg_hba_conf + +- name: allow users to connect locally (ipv4) sudo: yes lineinfile: # TODO: should not hardcode that version -- 2.47.3