[goal] Deprecate the JSON formatted policy file
As per the community goal of migrating the policy file the format from JSON to YAML[1], we need to replace policy.json to policy.yaml and remove deprecated policy.json. [1]https://governance.openstack.org/tc/goals/selected/wallaby/migrate-policy-format-from-json-to-yaml.html Change-Id: Iede5a9f0387baaf9c72bd060b59435ffaa76f1bd
This commit is contained in:
parent
538ada902f
commit
6b5a93edb9
@ -28,6 +28,15 @@
|
|||||||
- "Restart cinder services"
|
- "Restart cinder services"
|
||||||
- "venv changed"
|
- "venv changed"
|
||||||
|
|
||||||
|
# NOTE (noonedeadpunk): Remove this task after Xena release
|
||||||
|
- name: Remove obsoleted policy.json file
|
||||||
|
file:
|
||||||
|
path: "/etc/cinder/policy.json"
|
||||||
|
state: absent
|
||||||
|
listen:
|
||||||
|
- Restart cinder services
|
||||||
|
- venv changed
|
||||||
|
|
||||||
- name: Start services
|
- name: Start services
|
||||||
service:
|
service:
|
||||||
name: "{{ item.service_name }}"
|
name: "{{ item.service_name }}"
|
||||||
|
@ -63,20 +63,29 @@
|
|||||||
- cinder-config
|
- cinder-config
|
||||||
- cinder-post-install
|
- cinder-post-install
|
||||||
|
|
||||||
- name: Implement policy.json if there are overrides configured
|
- name: Implement policy.yaml if there are overrides configured
|
||||||
copy:
|
config_template:
|
||||||
content: "{{ cinder_policy_overrides | to_nice_json }}"
|
content: "{{ cinder_policy_overrides }}"
|
||||||
dest: "/etc/cinder/policy.json"
|
dest: "/etc/cinder/policy.yaml"
|
||||||
notify:
|
owner: "root"
|
||||||
- Manage LB
|
group: "{{ cinder_system_group_name }}"
|
||||||
- Restart cinder services
|
mode: "0640"
|
||||||
- Restart uwsgi services
|
config_type: yaml
|
||||||
when:
|
when:
|
||||||
- cinder_policy_overrides != {}
|
- cinder_policy_overrides | length > 0
|
||||||
tags:
|
tags:
|
||||||
- cinder-config
|
- cinder-config
|
||||||
- cinder-policy-override
|
- cinder-policy-override
|
||||||
|
|
||||||
|
- name: Remove legacy policy.yaml file
|
||||||
|
file:
|
||||||
|
path: "/etc/cinder/policy.yaml"
|
||||||
|
state: absent
|
||||||
|
when:
|
||||||
|
- cinder_policy_overrides | length == 0
|
||||||
|
tags:
|
||||||
|
- cinder-policy-override
|
||||||
|
|
||||||
# NOTE(cloudnull): This is using "cp" instead of copy with a remote_source
|
# NOTE(cloudnull): This is using "cp" instead of copy with a remote_source
|
||||||
# because we only want to copy the original files once. and we
|
# because we only want to copy the original files once. and we
|
||||||
# don't want to need multiple tasks.
|
# don't want to need multiple tasks.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user