File tree Expand file tree Collapse file tree 3 files changed +13
-1
lines changed Expand file tree Collapse file tree 3 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -45,5 +45,10 @@ script:
45
45
# Check PostgreSQL status.
46
46
- ' docker exec -u postgres "$(cat ${container_id})" pg_ctl -D /var/lib/pgsql/data status'
47
47
48
+ after_failure :
49
+ # Check what happened on systemd systems.
50
+ - ' docker exec --tty "$(cat ${container_id})" env TERM=xterm systemctl -l status postgresql.service'
51
+ - ' docker exec --tty "$(cat ${container_id})" env TERM=xterm journalctl -xe --no-pager'
52
+
48
53
notifications :
49
54
webhooks : https://galaxy.ansible.com/api/v1/notifications/
Original file line number Diff line number Diff line change 1
1
---
2
+ - name : Set PGDATA environment variable.
3
+ template :
4
+ src : postgres.sh.j2
5
+ dest : /etc/profile.d/postgres.sh
6
+ mode : 0644
7
+
2
8
- name : Ensure PostgreSQL data directory exists.
3
9
file :
4
10
path : " {{ postgresql_data_dir }}"
14
20
15
21
- name : Ensure PostgreSQL database is initialized.
16
22
command : " initdb -D {{ postgresql_data_dir }}"
17
- when : pgdata_dir_version.stat.exists
23
+ when : not pgdata_dir_version.stat.exists
18
24
become : yes
19
25
become_user : " {{ postgresql_user }}"
Original file line number Diff line number Diff line change
1
+ export PGDATA={{ postgresql_data_dir }}
You can’t perform that action at this time.
0 commit comments