Add the role enabled check for some projects

1. Add the role enabled check for some projects
2. adjust the file created positon for keystone to keep
consistence with others

Change-Id: Id2b893ba546b3adf41d97927f8d20dca403a0457
This commit is contained in:
caoyuan 2018-06-27 16:59:28 +08:00
parent b138820bf4
commit 2b3a046871
5 changed files with 23 additions and 17 deletions
ansible/roles
congress/tasks
keystone/tasks
mistral/tasks
tacker/tasks
zun/tasks

@ -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

@ -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 }}"

@ -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

@ -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

@ -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