retrace: do not init pg twice
This commit is contained in:
parent
54f094b2d5
commit
b7ccda8f59
1 changed files with 1 additions and 13 deletions
|
@ -1,8 +1,6 @@
|
|||
---
|
||||
- name: Ensure PostgreSQL database is initialized.
|
||||
command: "initdb --no-locale -D /var/lib/pgsql/data"
|
||||
become: true
|
||||
become_user: "postgres"
|
||||
command: "postgresql-setup --initdb --unit postgresql"
|
||||
args:
|
||||
creates: "/var/lib/pgsql/data/PG_VERSION"
|
||||
|
||||
|
@ -76,16 +74,6 @@
|
|||
state: absent
|
||||
when: faf_recreate_database|bool
|
||||
|
||||
- name: check postgresql initdb
|
||||
stat:
|
||||
path: /var/lib/pgsql/initdb.log
|
||||
register: st
|
||||
|
||||
- name: initdb postgresql
|
||||
command: postgresql-setup initdb
|
||||
when: st.stat.exists == False
|
||||
become: true
|
||||
|
||||
- name: start service postgresql
|
||||
service:
|
||||
name: postgresql
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue