Allow to override zun policy files
We implement `zun_policy_overrides` variable in order to allow management of zun policy files when needed. Change-Id: If58446a2ca1aa645e098df86c3d76c8ac94bf1a1
This commit is contained in:
parent
b47583d8a2
commit
513e730990
@ -368,3 +368,4 @@ zun_compute_init_overrides: {}
|
||||
zun_kuryr_init_overrides: {}
|
||||
zun_docker_init_overrides: {}
|
||||
zun_docker_cleanup_init_overrides: {}
|
||||
zun_policy_overrides: {}
|
||||
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
Added variable ``zun_policy_overrides`` that aims to allow deploying
|
||||
policy.yaml file with provided overrides for Zun service.
|
@ -60,6 +60,25 @@
|
||||
- zun-config
|
||||
- zun-post-install
|
||||
|
||||
- name: Implement policy.yaml if there are overrides configured
|
||||
config_template:
|
||||
content: "{{ zun_policy_overrides }}"
|
||||
dest: "/etc/zun/policy.yaml"
|
||||
config_type: yaml
|
||||
when:
|
||||
- zun_policy_overrides | length > 0
|
||||
tags:
|
||||
- zun-policy-override
|
||||
|
||||
- name: Remove legacy policy.yaml file
|
||||
file:
|
||||
path: "/etc/zun/policy.yaml"
|
||||
state: absent
|
||||
when:
|
||||
- zun_policy_overrides | length == 0
|
||||
tags:
|
||||
- zun-policy-override
|
||||
|
||||
- name: Synchronize the zun DB schema
|
||||
command: "{{ zun_bin }}/zun-db-manage --config-dir /etc/zun upgrade"
|
||||
become: yes
|
||||
|
Loading…
Reference in New Issue
Block a user