Drop default policy file location
With master version of Gnocchi[1], default policy file is no longer provided
since all policies are currently stored in code.
Moreover, it's long due to switch policy formats to YAML instead of
json.
[1] 6ad4bb8e62
Change-Id: Ie7923f3b1fa3fcf3f463b476f908be09533e103a
This commit is contained in:
parent
d44b25ebb8
commit
1ae203e715
|
@ -215,14 +215,13 @@ gnocchi_memcached_servers: "{{ memcached_servers }}"
|
|||
# not exist then the default files will be sourced from the
|
||||
# service git repository.
|
||||
gnocchi_api_paste_default_file_path: "/etc/openstack_deploy/gnocchi/api-paste.ini"
|
||||
gnocchi_policy_default_file_path: "/etc/openstack_deploy/gnocchi/policy.json"
|
||||
gnocchi_policy_default_file_path: "/etc/openstack_deploy/gnocchi/policy.yaml"
|
||||
|
||||
# If the above-mentioned files do not exist, then these
|
||||
# paths will be used to find the files from the git config
|
||||
# lookup location.
|
||||
gnocchi_git_config_lookup_location: https://raw.githubusercontent.com/gnocchixyz/gnocchi/{{ gnocchi_git_install_branch }}/
|
||||
gnocchi_api_paste_git_file_path: "gnocchi/rest/api-paste.ini"
|
||||
gnocchi_policy_git_file_path: "gnocchi/rest/policy.json"
|
||||
|
||||
# Tunable var-based overrides
|
||||
# The contents of these are templated over the default files.
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
- "cert installed"
|
||||
|
||||
# Note (odyssey4me):
|
||||
# The policy.json file is currently read continually by the services
|
||||
# The policy.yaml file is currently read continually by the services
|
||||
# and is not only read on service start. We therefore cannot template
|
||||
# directly to the file read by the service because the new policies
|
||||
# may not be valid until the service restarts. This is particularly
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
return_content: yes
|
||||
with_items:
|
||||
- "{{ gnocchi_git_config_lookup_location }}/{{ gnocchi_api_paste_git_file_path }}"
|
||||
- "{{ gnocchi_git_config_lookup_location }}/{{ gnocchi_policy_git_file_path }}"
|
||||
register: _git_file_fetch
|
||||
|
||||
- name: Copy gnocchi configuration files
|
||||
|
@ -44,7 +43,7 @@
|
|||
- dest: "/etc/gnocchi/policy.yaml-{{ gnocchi_venv_tag }}"
|
||||
config_overrides: "{{ gnocchi_policy_overrides }}"
|
||||
config_type: "yaml"
|
||||
content: "{{ gnocchi_policy_user_content | default(gnocchi_policy_default_content, true) }}"
|
||||
content: "{{ gnocchi_policy_user_content }}"
|
||||
notify:
|
||||
- Restart gnocchi services
|
||||
- Restart uwsgi services
|
||||
|
|
|
@ -29,11 +29,6 @@ gnocchi_api_paste_default_content: |
|
|||
_git_file_fetch.results | selectattr(
|
||||
'item', 'equalto', gnocchi_git_config_lookup_location ~ '/' ~ gnocchi_api_paste_git_file_path) | map(attribute='content') | first
|
||||
}}
|
||||
gnocchi_policy_default_content: |
|
||||
{{
|
||||
_git_file_fetch.results | selectattr(
|
||||
'item', 'equalto', gnocchi_git_config_lookup_location ~ '/' ~ gnocchi_policy_git_file_path) | map(attribute='content') | first
|
||||
}}
|
||||
|
||||
# NOTE(noonedeadpunk): We prefer using ceph_alternative when storage driver is ceph.
|
||||
# However, if we define ceph_alternative here, gnocchi with setup.cfg
|
||||
|
|
Loading…
Reference in New Issue