]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-build.git/commitdiff
shaman-pull-requests use the new template for pg_hba.conf 976/head
authorAlfredo Deza <adeza@redhat.com>
Mon, 5 Mar 2018 18:32:37 +0000 (13:32 -0500)
committerAlfredo Deza <adeza@redhat.com>
Mon, 5 Mar 2018 18:33:23 +0000 (13:33 -0500)
Signed-off-by: Alfredo Deza <adeza@redhat.com>
shaman-pull-requests/setup/playbooks/tasks/postgresql.yml

index 14a9d1bf321c774fd53f46720ce9d2b07578a52d..ff5af980f71c6d5c8c7aca7ab9c19bd67b294230 100644 (file)
     enabled: yes
   become: yes
 
-- 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
-     # 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             127.0.0.1/32            trust'
-     backrefs: yes
-  register: pg_hba_conf
+- name: "Build pg_hba.conf file"
+  become: true
+  template:
+    src: pg_hba.conf.j2
+    dest: "/etc/postgresql/9.5/main/pg_hba.conf"
 
 - name: make jenkins-build user
   postgresql_user: