use policy.yaml instead of policy.json due to latest change on gnocchi
Change-Id: If05936d25db3329b4204172f3b800ddf3417b9b7
This commit is contained in:
parent
069d0498f6
commit
f1f47cad9e
|
@ -30,8 +30,6 @@
|
||||||
listen:
|
listen:
|
||||||
- "Restart gnocchi services"
|
- "Restart gnocchi services"
|
||||||
- "venv changed"
|
- "venv changed"
|
||||||
- "systemd service changed"
|
|
||||||
- "cert installed"
|
|
||||||
|
|
||||||
# Note (odyssey4me):
|
# Note (odyssey4me):
|
||||||
# The policy.json file is currently read continually by the services
|
# The policy.json file is currently read continually by the services
|
||||||
|
@ -43,8 +41,8 @@
|
||||||
#
|
#
|
||||||
- name: Copy new policy file into place
|
- name: Copy new policy file into place
|
||||||
copy:
|
copy:
|
||||||
src: "/etc/gnocchi/policy.json-{{ gnocchi_venv_tag }}"
|
src: "/etc/gnocchi/policy.yaml-{{ gnocchi_venv_tag }}"
|
||||||
dest: "/etc/gnocchi/policy.json"
|
dest: "/etc/gnocchi/policy.yaml"
|
||||||
owner: "root"
|
owner: "root"
|
||||||
group: "{{ gnocchi_system_group_name }}"
|
group: "{{ gnocchi_system_group_name }}"
|
||||||
mode: "0640"
|
mode: "0640"
|
||||||
|
@ -70,5 +68,13 @@
|
||||||
listen:
|
listen:
|
||||||
- "Restart gnocchi services"
|
- "Restart gnocchi services"
|
||||||
- "venv changed"
|
- "venv changed"
|
||||||
- "systemd service changed"
|
|
||||||
- "cert installed"
|
# NOTE(noonedeadpunk): This task is created due to migration from apache to uwsgi
|
||||||
|
# which was introduced during train release. It can be dropped afterwards.
|
||||||
|
- name: Restart web server
|
||||||
|
service:
|
||||||
|
name: "{{ gnocchi_system_service_name }}"
|
||||||
|
enabled: yes
|
||||||
|
state: "restarted"
|
||||||
|
daemon_reload: yes
|
||||||
|
failed_when: false
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
- name: Copy gnocchi configuration files
|
- name: Copy gnocchi configuration files
|
||||||
openstack.config_template.config_template:
|
openstack.config_template.config_template:
|
||||||
content: "{{ item.content | default(omit) }}"
|
content: "{{ item.content | default(omit) }}"
|
||||||
src: "{{ item.src | default(omit) }}"
|
src: "{{ item.src | default(omit) }}"
|
||||||
dest: "{{ item.dest }}"
|
dest: "{{ item.dest }}"
|
||||||
owner: "{{ item.owner | default(gnocchi_system_user_name) }}"
|
owner: "{{ item.owner | default(gnocchi_system_user_name) }}"
|
||||||
group: "{{ item.group | default(gnocchi_system_group_name) }}"
|
group: "{{ item.group | default(gnocchi_system_group_name) }}"
|
||||||
|
@ -41,10 +41,47 @@
|
||||||
config_overrides: "{{ gnocchi_api_paste_ini_overrides }}"
|
config_overrides: "{{ gnocchi_api_paste_ini_overrides }}"
|
||||||
config_type: "ini"
|
config_type: "ini"
|
||||||
content: "{{ gnocchi_api_paste_user_content | default(gnocchi_api_paste_default_content, true) }}"
|
content: "{{ gnocchi_api_paste_user_content | default(gnocchi_api_paste_default_content, true) }}"
|
||||||
- dest: "/etc/gnocchi/policy.json-{{ gnocchi_venv_tag }}"
|
|
||||||
config_overrides: "{{ gnocchi_policy_overrides }}"
|
|
||||||
config_type: "json"
|
|
||||||
content: "{{ gnocchi_policy_user_content | default(gnocchi_policy_default_content, true) }}"
|
|
||||||
notify:
|
notify:
|
||||||
- Restart gnocchi services
|
- Restart gnocchi services
|
||||||
- Restart uwsgi services
|
- Restart uwsgi services
|
||||||
|
- Restart web server
|
||||||
|
|
||||||
|
- name: Implement policy.yaml if there are overrides configured
|
||||||
|
openstack.config_template.config_template:
|
||||||
|
content: "{{ gnocchi_policy_overrides }}"
|
||||||
|
dest: "/etc/gnocchi/policy.yaml-{{ gnocchi_venv_tag }}"
|
||||||
|
owner: "root"
|
||||||
|
group: "{{ gnocchi_system_group_name }}"
|
||||||
|
mode: "0640"
|
||||||
|
config_type: yaml
|
||||||
|
when:
|
||||||
|
- gnocchi_policy_overrides | length > 0
|
||||||
|
tags:
|
||||||
|
- gnocchi-policy-override
|
||||||
|
|
||||||
|
- name: Remove legacy policy.yaml file
|
||||||
|
file:
|
||||||
|
path: "/etc/gnocchi/policy.yaml"
|
||||||
|
state: absent
|
||||||
|
when:
|
||||||
|
- gnocchi_policy_overrides | length == 0
|
||||||
|
tags:
|
||||||
|
- gnocchi-policy-override
|
||||||
|
|
||||||
|
# NOTE(noonedeadpunk): This task is created due to migration from apache to uwsgi
|
||||||
|
# which was introduced during train release. It can be dropped afterwards.
|
||||||
|
- name: Drop Apache related configs
|
||||||
|
file:
|
||||||
|
path: "{{ item }}"
|
||||||
|
state: absent
|
||||||
|
with_items: "{{ gnocchi_apache_config }}"
|
||||||
|
notify:
|
||||||
|
- Restart web server
|
||||||
|
|
||||||
|
- name: Stop Apache listening on Gnocchi port
|
||||||
|
lineinfile:
|
||||||
|
path: "{{ gnocchi_apache_ports }}"
|
||||||
|
state: absent
|
||||||
|
line: "Listen {{ gnocchi_service_port }}"
|
||||||
|
notify:
|
||||||
|
- Restart web server
|
||||||
|
|
Loading…
Reference in New Issue