From 502597498267f0c33f4e4fba528530054f67ee37 Mon Sep 17 00:00:00 2001 From: Tatsuma Matsuki Date: Tue, 28 Nov 2017 01:01:17 +0000 Subject: [PATCH] Add a missing conditional check to the common config task The owner and permission check for config directories should be executed only when the service is enabled. Change-Id: I6dd2a8fcce83cba8a9a79b1c302d6b1ef4305144 Closes-Bug: #1734789 --- ansible/roles/common/tasks/config.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ansible/roles/common/tasks/config.yml b/ansible/roles/common/tasks/config.yml index 1e89d48eb4..a9dd36f8e7 100644 --- a/ansible/roles/common/tasks/config.yml +++ b/ansible/roles/common/tasks/config.yml @@ -201,13 +201,14 @@ - name: Ensuring config directories have correct owner and permission become: true file: - path: "{{ node_config_directory }}/{{ item }}" + path: "{{ node_config_directory }}/{{ item.key }}" owner: "{{ config_owner_user }}" group: "{{ config_owner_group }}" mode: "0770" - with_items: - - "fluentd" - - "cron" + when: + - item.value.enabled | bool + - item.key != "kolla-toolbox" + with_dict: "{{ common_services }}" - name: Check common containers kolla_docker: