From 932dc82eff56f0d49ccd5d7399ff8d37ce2582f1 Mon Sep 17 00:00:00 2001 From: Dmitriy Rabotyagov Date: Fri, 14 Nov 2025 11:40:03 +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: Ica14bb275fd02e83e2d26fdc9ce266c53e7f1f56 Signed-off-by: Dmitriy Rabotyagov --- tasks/heat_post_install.yml | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/tasks/heat_post_install.yml b/tasks/heat_post_install.yml index 606ed5c..e9e2b38 100644 --- a/tasks/heat_post_install.yml +++ b/tasks/heat_post_install.yml @@ -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