Skip to content
Snippets Groups Projects
Commit 2b402ace authored by Jeffrey Zhang's avatar Jeffrey Zhang
Browse files

Fix the WARNING in copy keystone domain task

Change-Id: I2bf2e8a6ba17c813bb2b9cdf05d3062f29d9fdf6
Closes-Bug: #1653168
parent fee7ec05
No related branches found
No related tags found
No related merge requests found
......@@ -5,7 +5,7 @@
- name: Check if Keystone Domain specific settings enabled
local_action: stat path="{{ node_custom_config }}/keystone/domains"
register: keystone_domain_cfg
register: keystone_domain_directory
- name: Ensuring config directories exist
file:
......@@ -17,17 +17,6 @@
- item.value.enabled
with_dict: "{{ keystone_services }}"
- name: Creating Keystone Domain directory
vars:
keystone: "{{ keystone_services.keystone }}"
file:
dest: "{{ node_config_directory }}/keystone/domains/"
state: "directory"
when:
- inventory_hostname in groups[keystone.group]
- keystone.enabled | bool
- keystone_domain_cfg.stat.exists
- name: Copying over config.json files for services
template:
src: "{{ item.key }}.json.j2"
......@@ -65,18 +54,34 @@
- Restart keystone container
- Restart keystone-fernet container
- name: Creating Keystone Domain directory
vars:
keystone: "{{ keystone_services.keystone }}"
file:
dest: "{{ node_config_directory }}/keystone/domains/"
state: "directory"
when:
- inventory_hostname in groups[keystone.group]
- keystone.enabled | bool
- keystone_domain_directory.stat.exists
- name: Get file list in custom domains folder
local_action: find path="{{ node_custom_config }}/keystone/domains" recurse=no file_type=file
register: keystone_domains
when: keystone_domain_directory.stat.exists
- name: Copying Keystone Domain specific settings
vars:
keystone: "{{ keystone_services.keystone }}"
copy:
src: "{{ item }}"
src: "{{ item.path }}"
dest: "{{ node_config_directory }}/keystone/domains/"
register: keystone_domains
when:
- inventory_hostname in groups[keystone.group]
- keystone.enabled | bool
with_fileglob:
- "{{ node_custom_config }}/keystone/domains/*"
- keystone_domain_directory.stat.exists
with_items: "{{ keystone_domains.files|default([]) }}"
notify:
- Restart keystone container
......
......@@ -14,7 +14,7 @@ secure_proxy_ssl_header = HTTP_X_FORWARDED_PROTO
connection = mysql+pymysql://{{ keystone_database_user }}:{{ keystone_database_password }}@{{ keystone_database_address }}/{{ keystone_database_name }}
max_retries = -1
{% if keystone_domain_cfg.stat.exists %}
{% if keystone_domain_directory.stat.exists %}
[identity]
domain_specific_drivers_enabled = true
domain_config_dir = /etc/keystone/domains
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment