diff --git a/deploy/ansible/roles/postgresql/tasks/main.yml b/deploy/ansible/roles/postgresql/tasks/main.yml index d540d746..6ecceceb 100644 --- a/deploy/ansible/roles/postgresql/tasks/main.yml +++ b/deploy/ansible/roles/postgresql/tasks/main.yml @@ -56,6 +56,12 @@ become: true become_user: postgres +- name: Add .pgpass + template: + src: pgpass.j2 + dest: ~/.pgpass + mode: 0600 + - name: Reload postgres systemd: name: postgresql diff --git a/deploy/ansible/roles/postgresql/templates/pgpass.j2 b/deploy/ansible/roles/postgresql/templates/pgpass.j2 new file mode 100644 index 00000000..c4fd452e --- /dev/null +++ b/deploy/ansible/roles/postgresql/templates/pgpass.j2 @@ -0,0 +1 @@ +localhost:5432:{{ nyaapantsu_dbname }}:{{ nyaapantsu_user }}:{{ nyaapantsu_password }}