]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-build.git/commitdiff
shaman-pull-requests allow users to connect locally over ipv6 sans password 975/head
authorAlfredo Deza <adeza@redhat.com>
Mon, 5 Mar 2018 17:05:43 +0000 (12:05 -0500)
committerAlfredo Deza <adeza@redhat.com>
Mon, 5 Mar 2018 17:06:48 +0000 (12:06 -0500)
Signed-off-by: Alfredo Deza <adeza@redhat.com>
shaman-pull-requests/setup/playbooks/tasks/postgresql.yml

index 5edd6055ec041e4f77838b606817087c4d002bf0..14a9d1bf321c774fd53f46720ce9d2b07578a52d 100644 (file)
@@ -9,7 +9,7 @@
   apt:
     name: "{{ item }}"
     state: present
-  with_items: 
+  with_items:
     - postgresql
     - postgresql-common
     - postgresql-contrib
     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