Do not remove policy.yaml file
oslo.policy can not handle policy file removal. As a result, if policy overrides were defined at some point, but then removed, causes service outage. While we could add a handler trigger to restart the service on policy removal, it's better to simplify the logic and always place an empty policy.yaml even if no overrides are defined. Change-Id: Ica14bb275fd02e83e2d26fdc9ce266c53e7f1f56 Signed-off-by: Dmitriy Rabotyagov <dmitriy.rabotyagov@cleura.com>
This commit is contained in:
@@ -26,7 +26,7 @@
|
||||
- Restart heat services
|
||||
- Restart uwsgi services
|
||||
|
||||
- name: Implement policy.yaml if there are overrides configured
|
||||
- name: Implement policy.yaml file
|
||||
openstack.config_template.config_template:
|
||||
content: "{{ heat_policy_overrides }}"
|
||||
dest: "/etc/heat/policy.yaml"
|
||||
@@ -34,17 +34,6 @@
|
||||
group: "{{ heat_system_group_name }}"
|
||||
mode: "0640"
|
||||
config_type: yaml
|
||||
when:
|
||||
- heat_policy_overrides | length > 0
|
||||
tags:
|
||||
- heat-policy-override
|
||||
|
||||
- name: Remove legacy policy.yaml file
|
||||
ansible.builtin.file:
|
||||
path: "/etc/heat/policy.yaml"
|
||||
state: absent
|
||||
when:
|
||||
- heat_policy_overrides | length == 0
|
||||
tags:
|
||||
- heat-policy-override
|
||||
|
||||
|
||||
Reference in New Issue
Block a user