diff --git a/ansible/roles/common/tasks/config.yml b/ansible/roles/common/tasks/config.yml index a9dd36f8e7..7a973c9486 100644 --- a/ansible/roles/common/tasks/config.yml +++ b/ansible/roles/common/tasks/config.yml @@ -80,12 +80,16 @@ pattern: "*.conf" run_once: True register: find_custom_fluentd_outputs + when: + - enable_fluentd | bool - name: Copying over custom fluentd output config files template: src: "{{ item.path }}" dest: "{{ node_config_directory }}/fluentd/output/{{ item.path | basename }}" register: fluentd_output_custom + when: + - enable_fluentd | bool with_items: "{{ find_custom_fluentd_outputs.files }}" notify: - Restart fluentd container diff --git a/ansible/roles/common/tasks/pull.yml b/ansible/roles/common/tasks/pull.yml index ac648a0f2d..9eb75ae987 100644 --- a/ansible/roles/common/tasks/pull.yml +++ b/ansible/roles/common/tasks/pull.yml @@ -4,4 +4,6 @@ action: "pull_image" common_options: "{{ docker_common_options }}" image: "{{ item.value.image }}" + when: + - item.value.enabled | bool with_dict: "{{ common_services }}"