infra: only install logrotate on right nodes

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>
(cherry picked from commit 8ed11ea3ee)
pull/5669/head
Guillaume Abrioux 2020-08-13 20:37:11 +02:00 committed by Dimitri Savineau
parent af36ee479b
commit d84161db1a
1 changed files with 9 additions and 1 deletions

View File

@ -24,8 +24,16 @@
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: