File tree Expand file tree Collapse file tree 4 files changed +11
-2
lines changed
Expand file tree Collapse file tree 4 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 1+ postgres_user : walter
2+ postgres_db : walter
Original file line number Diff line number Diff line change 1+ $ANSIBLE_VAULT;1.1;AES256
2+ 34656137313237356565623438363465643366346231633864323734343864393763643737343261
3+ 3461353363376130343230343233363166396265343130320a346337303334653663313132373637
4+ 30343934303234303964656339636536393866303666353638366137333666613062313764613039
5+ 3061626131356663630a623835393632323531663334656262343631383636313438323533633838
6+ 32616438383231366130363964326538323236333233313063363433383036326466363563393432
7+ 3139393163643233623138396664323266396337353365343533
Original file line number Diff line number Diff line change 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 :
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ Restart=always
99ExecStartPre =-/usr/bin/docker stop %n
1010ExecStartPre =-/usr/bin/docker rm %n
1111ExecStartPre =/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]
You can’t perform that action at this time.
0 commit comments