
Instead of sourcing the paste/policy files from the role, the deploy host will first be checked, then the git source. This eliminates our need to carry the template files and keep them up to date. It also ensures that if a custom git source or alternative SHA is used, the correct source templates are used. Related-To: I97476c42172cace5601f777e771ba0aa649b05ca Change-Id: I910bb1700bafd48185c15d64401c8f8e93c696ea
89 lines
3.1 KiB
YAML
89 lines
3.1 KiB
YAML
---
|
|
# Copyright 2014, Rackspace US, Inc.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
- name: Copy keystone config
|
|
config_template:
|
|
src: "{{ item.src }}"
|
|
dest: "{{ item.dest }}"
|
|
owner: "root"
|
|
group: "{{ keystone_system_group_name }}"
|
|
mode: "0640"
|
|
config_overrides: "{{ item.config_overrides }}"
|
|
config_type: "{{ item.config_type }}"
|
|
with_items:
|
|
- src: "keystone.conf.j2"
|
|
dest: "/etc/keystone/keystone.conf"
|
|
config_overrides: "{{ keystone_keystone_conf_overrides }}"
|
|
config_type: "ini"
|
|
notify:
|
|
- Restart uWSGI on first node
|
|
- Restart uWSGI on other nodes
|
|
- Restart web server on first node
|
|
- Restart web server on other nodes
|
|
|
|
- name: Retrieve and config_template upstream files
|
|
config_template:
|
|
content: "{{ lookup('pipe', item.content) | string }}"
|
|
dest: "{{ item.dest }}"
|
|
config_overrides: "{{ item.config_overrides }}"
|
|
config_type: "{{ item.config_type }}"
|
|
with_items:
|
|
- dest: "/etc/keystone/keystone-paste.ini"
|
|
config_overrides: "{{ keystone_keystone_paste_ini_overrides }}"
|
|
config_type: "ini"
|
|
content: |
|
|
cat {{ keystone_paste_default_file_path }} 2>/dev/null || \
|
|
curl -s {{ keystone_git_config_lookup_location }}/{{ keystone_paste_git_file_path }}
|
|
- dest: "/etc/keystone/policy.json-{{ keystone_venv_tag }}"
|
|
config_overrides: "{{ keystone_policy_overrides }}"
|
|
config_type: "json"
|
|
content: |
|
|
cat {{ keystone_policy_default_file_path }} 2>/dev/null || \
|
|
echo {}
|
|
notify:
|
|
- Restart uWSGI on first node
|
|
- Restart uWSGI on other nodes
|
|
- Restart web server on first node
|
|
- Restart web server on other nodes
|
|
|
|
- name: Copy Keystone Federation SP SSO callback template
|
|
copy:
|
|
content: |
|
|
cat {{ keystone_sso_callback_file_path }} 2>/dev/null || \
|
|
curl -s {{ keystone_git_config_lookup_location }}/{{ keystone_sso_callback_git_file_path }}
|
|
dest: "/etc/keystone/sso_callback_template.html"
|
|
owner: "{{ keystone_system_user_name }}"
|
|
group: "{{ keystone_system_group_name }}"
|
|
mode: "0644"
|
|
when:
|
|
- keystone_idp != {}
|
|
notify:
|
|
- Restart uWSGI on first node
|
|
- Restart uWSGI on other nodes
|
|
- Restart web server on first node
|
|
- Restart web server on other nodes
|
|
|
|
- name: Clean up Keystone Federation SP SSO callback template
|
|
file:
|
|
path: "/etc/keystone/sso_callback_template.html"
|
|
state: absent
|
|
when:
|
|
- keystone_idp == {}
|
|
notify:
|
|
- Restart uWSGI on first node
|
|
- Restart uWSGI on other nodes
|
|
- Restart web server on first node
|
|
- Restart web server on other nodes
|