kolla-ansible/ansible/roles/horizon/tasks/policy_item.yml
Dai Dang Van 6d49dbb48a Support policy.yaml file [part 8]
- Horizon

This will copy only yaml or json policy file if they exist.

Change-Id: Ib8875ca54dc9dc69abc8338413f7724d9d4ecc45
Implements: blueprint support-custom-policy-yaml
Co-authored-By: Duong Ha-Quang <duonghq@vn.fujitsu.com>
2018-01-22 01:57:14 +00:00

23 lines
635 B
YAML

---
# Update policy file name
- set_fact:
supported_policy_files: "{{ supported_policy_format_list | map('regex_replace', '(.*)', '{{ project_name }}_\\1') | list }}"
- name: Check if policies shall be overwritten
local_action: stat path="{{ fullpath }}"
run_once: True
register: overwritten_files
with_first_found:
- files: "{{ supported_policy_files }}"
paths:
- "{{ node_custom_config }}/horizon/"
skip: true
loop_control:
loop_var: fullpath
- set_fact:
custom_policy: "{{ custom_policy }} + [ '{{ overwritten_files.results.0.stat.path }}' ]"
when:
- overwritten_files.results