Skip to content

Commit

Permalink
https://github.com/docker-library/postgres/pull/496
Browse files Browse the repository at this point in the history
  • Loading branch information
hswong3i committed Jan 14, 2020
1 parent a387476 commit b3c1e64
Show file tree
Hide file tree
Showing 3 changed files with 282 additions and 118 deletions.
24 changes: 23 additions & 1 deletion files/etc/ansible/roles/localhost/tasks/debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,32 @@
set -o pipefail
mv /usr/share/postgresql/{{ postgres_release }}/postgresql.conf.sample /usr/share/postgresql/
ln -s ../postgresql.conf.sample /usr/share/postgresql/{{ postgres_release }}/postgresql.conf.sample
sed -ri "s/^#*listen_addresses.*/listen_addresses = '*'/g" /usr/share/postgresql/postgresql.conf.sample
args:
executable: "/bin/bash"
register: result
until: result is succeeded
changed_when: result is not succeeded
tags: localhost

- name: copy templates
template:
dest: "{{ item.dest }}"
src: "{{ item.src | default('./templates' + item.dest + '.j2') }}"
owner: "{{ item.owner | default('root') }}"
group: "{{ item.group | default('root') }}"
mode: "{{ item.mode | default('0644') }}"
backup: true
loop:
- { dest: "/usr/share/postgresql/postgresql.conf.sample" }
tags: localhost

- name: prepare files
file:
dest: "{{ item.dest }}"
owner: "{{ item.owner | default('root') }}"
group: "{{ item.group | default('root') }}"
mode: "{{ item.mode | default('0644') }}"
state: "{{ item.state | default('file') }}"
loop:
- { dest: "/usr/share/postgresql/postgresql.conf.sample" }
tags: localhost
Loading

0 comments on commit b3c1e64

Please sign in to comment.