Merge "[goal] Deprecate the JSON formatted policy file"

This commit is contained in:
Zuul 2021-04-06 12:59:43 +00:00 committed by Gerrit Code Review
commit 0870a01a6a
2 changed files with 28 additions and 9 deletions

View File

@ -60,6 +60,15 @@
- "Restart nova services"
- "venv changed"
# NOTE (noonedeadpunk): Remove this task after Xena release
- name: Remove obsoleted policy.json
file:
path: "/etc/nova/policy.json"
state: absent
listen:
- "Restart nova services"
- "venv changed"
- name: Start services
service:
name: "{{ item.service_name }}"

View File

@ -81,16 +81,26 @@
- nova-config
- nova-post-install
- name: Implement policy.json if there are overrides configured
copy:
content: "{{ nova_policy_overrides | to_nice_json }}"
dest: "/etc/nova/policy.json"
- name: Implement policy.yaml if there are overrides configured
config_template:
content: "{{ nova_policy_overrides }}"
dest: "/etc/nova/policy.yaml"
owner: "root"
group: "{{ nova_system_group_name }}"
mode: "0640"
config_type: yaml
when:
- nova_policy_overrides != {}
notify:
- Manage LB
- Restart nova services
- Restart uwsgi services
- nova_policy_overrides | length > 0
tags:
- nova-config
- nova-policy-override
- name: Remove legacy policy.yaml file
file:
path: "/etc/nova/policy.yaml"
state: absent
when:
- nova_policy_overrides | length == 0
tags:
- nova-config
- nova-policy-override