aboutsummaryrefslogtreecommitdiff
path: root/ansible
diff options
context:
space:
mode:
authorNenad Radojevic <nradojevic@evoila.de>2016-07-19 13:53:44 +0000
committerNenad Radojevic <nradojevic@evoila.de>2016-07-19 13:53:44 +0000
commitb6936383da7d78692a11830bf655b893eef63da9 (patch)
treed2b3ee589d6147acca3d37a7cb6c6d0566f475d5 /ansible
parent85300a4f8fe4d9ddc676ed34ec5124031c932701 (diff)
downloadkolla-b6936383da7d78692a11830bf655b893eef63da9.tar.gz
kolla-b6936383da7d78692a11830bf655b893eef63da9.zip
Configurable policy.json for keystone
Copy custom policy.json into keystone container Change-Id: I58787c3dd7adbeff47d0898c23db95f5919510d3 Closes-Bug: #1604431
Diffstat (limited to 'ansible')
-rw-r--r--ansible/roles/keystone/tasks/config.yml11
-rw-r--r--ansible/roles/keystone/templates/keystone.json.j27
2 files changed, 18 insertions, 0 deletions
diff --git a/ansible/roles/keystone/tasks/config.yml b/ansible/roles/keystone/tasks/config.yml
index e64a8d7df..12c3f47eb 100644
--- a/ansible/roles/keystone/tasks/config.yml
+++ b/ansible/roles/keystone/tasks/config.yml
@@ -1,4 +1,8 @@
---
+- name: Check if Policies shall be overwritten
+ local_action: stat path="{{ node_custom_config }}/keystone/policy.json"
+ register: keystone_policy
+
- name: Check if Keystone Domain specific settings enabled
local_action: stat path="{{ node_custom_config }}/keystone/domains"
register: keystone_domain_cfg
@@ -49,6 +53,13 @@
with_fileglob:
- "{{ node_custom_config }}/keystone/domains/*"
+- name: Copying over existing policy.json
+ template:
+ src: "{{ node_custom_config }}/keystone/policy.json"
+ dest: "{{ node_config_directory }}/keystone/policy.json"
+ when:
+ keystone_policy.stat.exists
+
- name: Copying over wsgi-keystone.conf
template:
src: "wsgi-keystone.conf.j2"
diff --git a/ansible/roles/keystone/templates/keystone.json.j2 b/ansible/roles/keystone/templates/keystone.json.j2
index 21cc9559e..acd507ff8 100644
--- a/ansible/roles/keystone/templates/keystone.json.j2
+++ b/ansible/roles/keystone/templates/keystone.json.j2
@@ -17,6 +17,13 @@
"optional": true
},
{
+ "source": "{{ container_config_directory }}/policy.json",
+ "dest": "/etc/keystone/policy.json",
+ "owner": "keystone",
+ "perm": "0600",
+ "optional": true
+ },
+ {
"source": "{{ container_config_directory }}/wsgi-keystone.conf",
"dest": "/etc/{{ keystone_dir }}/wsgi-keystone.conf",
"owner": "keystone",