]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
infra: only install logrotate on right nodes
authorGuillaume Abrioux <gabrioux@redhat.com>
Thu, 13 Aug 2020 18:37:11 +0000 (20:37 +0200)
committerDimitri Savineau <savineau.dimitri@gmail.com>
Tue, 18 Aug 2020 14:56:09 +0000 (10:56 -0400)
For intsance, there is no need to install logrotate on clients nodes.

This also ensure logrotate is installed only for containerized
deployments since the packaging has an explicit dependency to logrotate

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
roles/ceph-infra/tasks/main.yml

index 60dcbb74fdaca147fac8c3a99fc5b6ac58468256..77337b6e645370706f411087c982710452850229 100644 (file)
     state: present
   register: result
   until: result is succeeded
-  when: not is_atomic | bool
   tags: with_pkg
+  when:
+    - not is_atomic | bool
+    - containerized_deployment | bool
+    - inventory_hostname in groups.get(mon_group_name, []) or
+      inventory_hostname in groups.get(osd_group_name, []) or
+      inventory_hostname in groups.get(mds_group_name, []) or
+      inventory_hostname in groups.get(rgw_group_name, []) or
+      inventory_hostname in groups.get(mgr_group_name, []) or
+      inventory_hostname in groups.get(rbdmirror_group_name, [])
 
 - name: add logrotate configuration
   template: