Skip to content

Commit 22eb939

Browse files
committed
Encrypt and change passwords
1 parent bbfc165 commit 22eb939

File tree

4 files changed

+11
-2
lines changed

4 files changed

+11
-2
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
postgres_user: walter
2+
postgres_db: walter
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
$ANSIBLE_VAULT;1.1;AES256
2+
34656137313237356565623438363465643366346231633864323734343864393763643737343261
3+
3461353363376130343230343233363166396265343130320a346337303334653663313132373637
4+
30343934303234303964656339636536393866303666353638366137333666613062313764613039
5+
3061626131356663630a623835393632323531663334656262343631383636313438323533633838
6+
32616438383231366130363964326538323236333233313063363433383036326466363563393432
7+
3139393163643233623138396664323266396337353365343533

ansible/roles/postgres/tasks/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# https://container-solutions.com/running-docker-containers-with-systemd/
22
- name: Add systemd file
3-
copy:
3+
template:
44
src: postgres.service
55
dest: /etc/systemd/system/postgres.service
66
notify:

ansible/roles/postgres/files/postgres.service renamed to ansible/roles/postgres/templates/postgres.service

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Restart=always
99
ExecStartPre=-/usr/bin/docker stop %n
1010
ExecStartPre=-/usr/bin/docker rm %n
1111
ExecStartPre=/usr/bin/docker pull postgres:11
12-
ExecStart=/usr/bin/docker run --rm -v "/var/lib/postgres:/var/lib/postgresql/data" -e "POSTGRES_USER=walter" -e "POSTGRES_DB=walter" -e "POSTGRES_PASSWORD=wesley" --name postgres --net=host postgres:11
12+
ExecStart=/usr/bin/docker run --rm -v "/var/lib/postgres:/var/lib/postgresql/data" -e "POSTGRES_USER={{ postgres_user }}" -e "POSTGRES_DB={{ postgres_password }}" -e "POSTGRES_PASSWORD={{ postgres_password }}" --name postgres --net=host postgres:11
1313

1414

1515
[Install]

0 commit comments

Comments
 (0)