Only run postgresql-setup initdb when /var/lib/pgsql/data does not exist
This commit is contained in:
parent
160d1efbb1
commit
b5e20b4b23
1 changed files with 2 additions and 1 deletions
|
@ -22,7 +22,8 @@
|
|||
- postgresql
|
||||
|
||||
- name: Initialize postgres if necessary
|
||||
command: /usr/bin/postgresql-setup initdb creates=/var/lib/pgsql/data
|
||||
command: /usr/bin/postgresql-setup initdb
|
||||
when: not os.path.exists("/var/lib/pgsql/data")
|
||||
notify:
|
||||
- restart postgresql
|
||||
tags:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue