Fix: initdb requires target dir to be empty

This commit is contained in:
Greg Dubicki 2022-07-11 18:19:16 +02:00
parent 590df03eb0
commit 15076b64a2
1 changed files with 8 additions and 8 deletions

View File

@ -14,14 +14,6 @@
state: directory
mode: 0700
- name: Ensure PostgreSQL log directory exists.
file:
path: "{{ postgresql_effective_log_dir }}"
owner: "{{ postgresql_user }}"
group: "{{ postgresql_group }}"
state: directory
mode: 0700
- name: Check if PostgreSQL database is initialized.
stat:
path: "{{ postgresql_data_dir }}/PG_VERSION"
@ -35,3 +27,11 @@
# See: https://github.com/ansible/ansible/issues/16048#issuecomment-229012509
vars:
ansible_ssh_pipelining: true
- name: Ensure PostgreSQL log directory exists.
file:
path: "{{ postgresql_effective_log_dir }}"
owner: "{{ postgresql_user }}"
group: "{{ postgresql_group }}"
state: directory
mode: 0700