diff --git a/ansible/roles/congress/tasks/config.yml b/ansible/roles/congress/tasks/config.yml index 75fcffa090..7d09577f79 100644 --- a/ansible/roles/congress/tasks/config.yml +++ b/ansible/roles/congress/tasks/config.yml @@ -7,7 +7,9 @@ group: "{{ config_owner_group }}" mode: "0770" become: true - when: inventory_hostname in groups[item.value.group] + when: + - inventory_hostname in groups[item.value.group] + - item.value.enabled | bool with_dict: "{{ congress_services }}" - name: Check if policies shall be overwritten diff --git a/ansible/roles/keystone/tasks/config.yml b/ansible/roles/keystone/tasks/config.yml index 047b658565..0c26075f76 100644 --- a/ansible/roles/keystone/tasks/config.yml +++ b/ansible/roles/keystone/tasks/config.yml @@ -1,4 +1,17 @@ --- +- name: Ensuring config directories exist + file: + path: "{{ node_config_directory }}/{{ item.key }}" + state: "directory" + owner: "{{ config_owner_user }}" + group: "{{ config_owner_group }}" + mode: "0770" + become: true + when: + - inventory_hostname in groups[item.value.group] + - item.value.enabled | bool + with_dict: "{{ keystone_services }}" + - name: Check if policies shall be overwritten local_action: stat path="{{ item }}" run_once: True @@ -21,19 +34,6 @@ run_once: True register: keystone_domain_directory -- name: Ensuring config directories exist - file: - path: "{{ node_config_directory }}/{{ item.key }}" - state: "directory" - owner: "{{ config_owner_user }}" - group: "{{ config_owner_group }}" - mode: "0770" - become: true - when: - - inventory_hostname in groups[item.value.group] - - item.value.enabled | bool - with_dict: "{{ keystone_services }}" - - name: Creating Keystone Domain directory vars: keystone: "{{ keystone_services.keystone }}" diff --git a/ansible/roles/mistral/tasks/config.yml b/ansible/roles/mistral/tasks/config.yml index be213b52aa..c16dc4b724 100644 --- a/ansible/roles/mistral/tasks/config.yml +++ b/ansible/roles/mistral/tasks/config.yml @@ -7,7 +7,9 @@ group: "{{ config_owner_group }}" mode: "0770" become: true - when: inventory_hostname in groups[item.value.group] + when: + - inventory_hostname in groups[item.value.group] + - item.value.enabled | bool with_dict: "{{ mistral_services }}" - name: Check if policies shall be overwritten diff --git a/ansible/roles/tacker/tasks/config.yml b/ansible/roles/tacker/tasks/config.yml index b60b8ed51b..abc96248d2 100644 --- a/ansible/roles/tacker/tasks/config.yml +++ b/ansible/roles/tacker/tasks/config.yml @@ -9,7 +9,7 @@ become: true when: - inventory_hostname in groups[item.value.group] - - item.value.enabled + - item.value.enabled | bool with_dict: "{{ tacker_services }}" - name: Check if policies shall be overwritten diff --git a/ansible/roles/zun/tasks/config.yml b/ansible/roles/zun/tasks/config.yml index c9e7997559..0aac546f31 100644 --- a/ansible/roles/zun/tasks/config.yml +++ b/ansible/roles/zun/tasks/config.yml @@ -7,7 +7,9 @@ group: "{{ config_owner_group }}" mode: "0770" become: true - when: inventory_hostname in groups[item.value.group] + when: + - inventory_hostname in groups[item.value.group] + - item.value.enabled | bool with_dict: "{{ zun_services }}" - name: Check if policies shall be overwritten