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: I3e96cbc9150e5051db19b3a93d68baf243beb17c Signed-off-by: Dmitriy Rabotyagov <dmitriy.rabotyagov@cleura.com>
This commit is contained in:
1 changed files with 1 additions and 13 deletions
@@ -43,7 +43,7 @@
tags:
- cloudkitty-config
- name:Implement policy.yaml if there are overrides configured
- name:Place policy.yaml file
openstack.config_template.config_template:
dest:"/etc/cloudkitty/policy.yaml"
content:"{{ cloudkitty_policy_overrides }}"
@@ -51,18 +51,6 @@
group:"{{ cloudkitty_system_group_name }}"
mode:"0644"
config_type:"yaml"
when:
- cloudkitty_policy_overrides | length > 0
tags:
- cloudkitty-policy-override
- cloudkitty-config
- name:Remove legacy policy.yaml file
ansible.builtin.file:
path:"/etc/cloudkitty/policy.yaml"
state:absent
when:
- cloudkitty_policy_overrides | length == 0
tags:
- cloudkitty-policy-override
- cloudkitty-config
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.