ansible-postgresql/tasks/init_postgres.yml
2022-02-07 16:58:05 +01:00

13 lines
392 B
YAML

- name: postgres | init_postgres | init database
ansible.builtin.command: /usr/pgsql-{{postgres_version}}/bin/postgresql-{{postgres_version}}-setup initdb
register: postgresql_database_init
args:
creates: /var/lib/pgsql/{{postgres_version}}/initdb.log
notify:
- start postgreql
- name: postgres | init_postgres | show posgres init
debug:
var: postgresql_database_init