diff --git a/tasks/Debian/postgresql_install.yaml b/tasks/Debian/postgresql_install.yaml index 61a9a31..896b0de 100644 --- a/tasks/Debian/postgresql_install.yaml +++ b/tasks/Debian/postgresql_install.yaml @@ -56,3 +56,12 @@ when: - patroni_postgresql_package_name in ansible_facts.packages - ansible_facts.packages[patroni_postgresql_package_name][0]['version'] != (patroni_postgresql_version|string + "-" + patroni_postgresql_version_build|string) + +- name: Create folder for PostgreSQL logs + file: + name: "{{ item }}" + state: directory + owner: "root" + group: "postgres" + loop: + - "{{ patroni_postgresql_log_dir }}" diff --git a/tasks/RedHat/postgresql_install.yaml b/tasks/RedHat/postgresql_install.yaml index 90517cc..d6c66f0 100644 --- a/tasks/RedHat/postgresql_install.yaml +++ b/tasks/RedHat/postgresql_install.yaml @@ -41,3 +41,12 @@ when: - patroni_postgresql_package_name in ansible_facts.packages - ansible_facts.packages[patroni_postgresql_package_name][0]['version'] != patroni_postgresql_version|string + +- name: Create folder for PostgreSQL logs + file: + name: "{{ item }}" + state: directory + owner: "postgres" + group: "postgres" + loop: + - "{{ patroni_postgresql_log_dir }}" diff --git a/tasks/config.yaml b/tasks/config.yaml index f399492..31c1424 100644 --- a/tasks/config.yaml +++ b/tasks/config.yaml @@ -24,7 +24,6 @@ group: "postgres" loop: - /etc/patroni - - /var/log/postgresql - /var/lib/pgsql_stats_tmp - name: Propagate Patroni config diff --git a/vars/RedHat.yaml b/vars/RedHat.yaml index 82f4aa0..b02f155 100644 --- a/vars/RedHat.yaml +++ b/vars/RedHat.yaml @@ -10,6 +10,8 @@ patroni_default_packages: - "{{ patroni_package_name }}-etcd-{{ patroni_version }}" - "{{ patroni_package_name }}-zookeeper-{{ patroni_version }}" +patroni_deps_packages: [] + # Patroni variables patroni_package_name: "patroni" patroni_package: "{{ patroni_package_name }}-{{ patroni_version }}"