From 43166743491f9224e7bcda93e12ba8227f203665 Mon Sep 17 00:00:00 2001 From: Dmitriy Rabotyagov Date: Fri, 14 Nov 2025 11:21:58 +0100 Subject: [PATCH] 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 --- tasks/cloudkitty_post_install.yml | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/tasks/cloudkitty_post_install.yml b/tasks/cloudkitty_post_install.yml index bfe599a..b5f1185 100644 --- a/tasks/cloudkitty_post_install.yml +++ b/tasks/cloudkitty_post_install.yml @@ -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