kolla-ansible/ansible/roles/gnocchi/templates/gnocchi-api.json.j2
Michal Nasiadka 1f929336e3 External Ceph: keys as variables
Introduce user modifiable variables instead of fixed-names
of Ceph keyring files for external Ceph functionality.

Change-Id: I1a33b3f9d6eca5babf53b91187461e43aef865ce
2020-01-22 18:16:38 +00:00

49 lines
1.6 KiB
Django/Jinja

{% set gnocchi_cmd = 'apache2' if kolla_base_distro in ['ubuntu', 'debian'] else 'httpd' %}
{% set gnocchi_dir = 'apache2/conf-enabled' if kolla_base_distro in ['ubuntu', 'debian'] else 'httpd/conf.d' %}
{
"command": "{{ gnocchi_cmd }} -DFOREGROUND",
"config_files": [
{
"source": "{{ container_config_directory }}/gnocchi.conf",
"dest": "/etc/gnocchi/gnocchi.conf",
"owner": "gnocchi",
"perm": "0600"
},
{
"source": "{{ container_config_directory }}/wsgi-gnocchi.conf",
"dest": "/etc/{{ gnocchi_dir }}/wsgi-gnocchi.conf",
"owner": "gnocchi",
"perm": "0600"
}{% if gnocchi_policy_file is defined %},
{
"source": "{{ container_config_directory }}/{{ gnocchi_policy_file }}",
"dest": "/etc/gnocchi/{{ gnocchi_policy_file }}",
"owner": "gnocchi",
"perm": "0600"
}{% endif %}{% if gnocchi_backend_storage == 'ceph' %},
{
"source": "{{ container_config_directory }}/ceph.conf",
"dest": "/etc/ceph/ceph.conf",
"owner": "gnocchi",
"perm": "0600"
},
{
"source": "{{ container_config_directory }}/{{ ceph_gnocchi_keyring }}",
"dest": "/etc/ceph/{{ ceph_gnocchi_keyring }}",
"owner": "gnocchi",
"perm": "0600"
}{% endif %}
],
"permissions": [
{
"path": "/var/lib/gnocchi",
"owner": "gnocchi:gnocchi"
},
{
"path": "/var/log/kolla/gnocchi",
"owner": "gnocchi:kolla"
}
]
}