Finished postgres role

This commit is contained in:
2021-01-05 12:20:04 +01:00
parent 57353a8fb5
commit 6b518f39f6
6 changed files with 27 additions and 9 deletions

View File

@ -4,16 +4,19 @@
src: pgpass.j2
dest: ~/.pgpass
mode: 0600
register: postgres_pgpass
- name: create temporary password file
template:
src: pgpass_temp.j2
dest: ~/.pgpass_temp
dest: ~/.pgpass.temp
mode: 0600
- name: setup database cluster
command: initdb --pwfile ~/pgpass.temp --auth=scram-sha-256 -E UTF8 -D ~/opt/postgresql/data/
command:
cmd: ~/opt/postgresql/bin/initdb --pwfile ~/.pgpass.temp --auth=scram-sha-256 -E UTF8 -D ~/opt/postgresql/data/
creates: ~/opt/postgresql/data/
- name: delete temporary password file
file:
path: ~/.pgpass_temp
path: ~/.pgpass.temp
state: absent
- name: update port
lineinfile: