From 46df551a0f00cf143ddd5cd9c651b08a13a79fb0 Mon Sep 17 00:00:00 2001 From: "Jesse Pretorius (odyssey4me)" Date: Fri, 29 Jan 2021 10:39:12 +0000 Subject: [PATCH] Use include_role for conditional inclusion When import_role is used with a condition, the condition is applied to all tasks in the role. This is inefficient. If we use include_role instead, then the role inclusion task is skipped and none of the tasks in the role are even evaluated. Related-bug: rhbz#1922132 Change-Id: I1b4e26fd4a46599985a989441f493a3ed39237bb --- deployment/metrics/collectd-container-puppet.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deployment/metrics/collectd-container-puppet.yaml b/deployment/metrics/collectd-container-puppet.yaml index d095b78f9c..31c65542c9 100644 --- a/deployment/metrics/collectd-container-puppet.yaml +++ b/deployment/metrics/collectd-container-puppet.yaml @@ -787,6 +787,6 @@ outputs: with_items: - { 'path': /var/log/containers/collectd, 'setype': container_file_t, 'mode': '0750' } - name: import provision_mcelog - import_role: + include_role: name: tripleo_provision_mcelog when: {get_param: CollectdEnableMcelog}