Skip to content

Commit f8fa0bf

Browse files
committed
Introduce new option disable_logrotate_for_postgresql
When set disable_logrotate_for_postgresql: false The new configuration option prevents removal of /etc/logrotate.d/postgresql-common Resolves: #1316
1 parent 03e86aa commit f8fa0bf

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

automation/roles/common/defaults/main.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1047,6 +1047,10 @@ cron_jobs: []
10471047
# weekday: "*"
10481048
# job: "echo 'example job two command'"
10491049

1050+
# Configure removal of the logrotate configuration file /etc/logrotate.d/postgresql-common
1051+
# when set to true, PostgreSQL log will NOT be rotated by logrotate.
1052+
disable_logrotate_for_postgresql: true # false => do not remove /etc/logrotate.d/postgresql-common, log will be rotated.
1053+
10501054
# Configure mount points in /etc/fstab and mount the file system (if 'mount.src' is defined)
10511055
mount:
10521056
- path: "/pgdata"

automation/roles/packages/tasks/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@
162162
ansible.builtin.file:
163163
dest: /etc/logrotate.d/postgresql-common
164164
state: absent
165+
when: disable_logrotate_for_postgresql | bool
165166

166167
- name: Install PostgreSQL packages
167168
ansible.builtin.apt:

0 commit comments

Comments
 (0)