]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-cm-ansible.git/commitdiff
lrc: Have logrotate cronjob optionally run the cephadm-created conf 647/head
authorDavid Galloway <dgallowa@redhat.com>
Mon, 23 Aug 2021 18:32:49 +0000 (14:32 -0400)
committerDavid Galloway <dgallowa@redhat.com>
Mon, 23 Aug 2021 18:40:11 +0000 (14:40 -0400)
cephadm manages a different logrotate file.  That file's name is the cluster FSID.

So I'll defined lrc_fsid in the secrets repo and this task will change the cronjob to run that logrotate file instead of the ceph-common one (that wasn't doing anything useful anyway).

Signed-off-by: David Galloway <dgallowa@redhat.com>
roles/long_running_cluster/tasks/logrotate.yml

index 27607cde67a631d0e3ff2bdd723b0a4e975fad75..19ef81707036f458e1a6c11f183c582cf28941a2 100644 (file)
@@ -7,12 +7,13 @@
 - name: "Write custom ceph logrotate config"
   template:
     src: ceph-common.logrotate
-    dest: /etc/logrotate.d/ceph-common
+    dest: /etc/logrotate.d/cm-ansible-ceph-common
+  when: lrc_fsid is not defined
 
 - name: "Create cronjob to logrotate every 6 hours"
   cron:
     name: "Logrotate ceph logs every 6 hours"
     minute: "25"
     hour: "0,6,12,18"
-    job: "/usr/sbin/logrotate -f /etc/logrotate.d/ceph-common"
+    job: "/usr/sbin/logrotate -f /etc/logrotate.d/{{ lrc_fsid|default('cm-ansible-ceph-common') }}"
     user: root