fix postgresql logs

This commit is contained in:
ace 2023-05-13 01:19:23 +03:00
parent a0dcfdd00f
commit d1258e7423
Signed by: ace
GPG Key ID: 2C08973DD37A76FD
4 changed files with 20 additions and 1 deletions

View File

@ -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 }}"

View File

@ -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 }}"

View File

@ -24,7 +24,6 @@
group: "postgres"
loop:
- /etc/patroni
- /var/log/postgresql
- /var/lib/pgsql_stats_tmp
- name: Propagate Patroni config

View File

@ -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 }}"