copr: frontend: better check for initialized PG
This commit is contained in:
parent
abef057fa7
commit
e70c87c52f
1 changed files with 4 additions and 5 deletions
|
@ -4,14 +4,13 @@
|
||||||
- "postgresql-server"
|
- "postgresql-server"
|
||||||
- "postgresql-contrib"
|
- "postgresql-contrib"
|
||||||
|
|
||||||
|
- name: See if PostgreSQL is initialized
|
||||||
- name: See if postgreSQL is installed
|
stat: path=/var/lib/pgsql/data/PG_VERSION
|
||||||
stat: path=/var/lib/pgsql/initdb.log
|
register: postgres_initialized
|
||||||
register: pgsql_installed
|
|
||||||
|
|
||||||
- name: init postgresql
|
- name: init postgresql
|
||||||
shell: "postgresql-setup initdb"
|
shell: "postgresql-setup initdb"
|
||||||
when: not pgsql_installed.stat.exists
|
when: not postgres_initialized.stat.exists
|
||||||
|
|
||||||
- name: copy pg_hba.conf
|
- name: copy pg_hba.conf
|
||||||
copy: src="pg/pg_hba.conf" dest=/var/lib/pgsql/data/pg_hba.conf owner=postgres group=postgres mode=0600
|
copy: src="pg/pg_hba.conf" dest=/var/lib/pgsql/data/pg_hba.conf owner=postgres group=postgres mode=0600
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue