Merge "Allow to override zun policy files"
This commit is contained in:
commit
f1c847b1df
@ -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