kolla-ansible/ansible/roles/cloudkitty/templates/cloudkitty-api.json.j2
Dai Dang Van 6b99f21341 Support policy.yaml file [part 4]
- Barbican
- Ceilometer
- Cloudkitty
- Congress
- Designate

This will copy only yaml or json policy file if they exist.

Change-Id: Iaa19f64073d8bdee948bc2de58e095ca72afc092
Implements: blueprint support-custom-policy-yaml
Co-authored-By: Duong Ha-Quang <duonghq@vn.fujitsu.com>
2018-01-22 01:57:02 +00:00

33 lines
1.2 KiB
Django/Jinja

{% set cloudkitty_cmd = 'apache2' if kolla_base_distro in ['ubuntu', 'debian'] else 'httpd' %}
{% set cloudkitty_dir = 'apache2/conf-enabled' if kolla_base_distro in ['ubuntu', 'debian'] else 'httpd/conf.d' %}
{
"command": "{{ cloudkitty_cmd }} -DFOREGROUND",
"config_files": [
{
"source": "{{ container_config_directory }}/cloudkitty.conf",
"dest": "/etc/cloudkitty/cloudkitty.conf",
"owner": "cloudkitty",
"perm": "0600"
},
{
"source": "{{ container_config_directory }}/wsgi-cloudkitty.conf",
"dest": "/etc/{{ cloudkitty_dir }}/wsgi-cloudkitty.conf",
"owner": "cloudkitty",
"perm": "0600"
}{% if cloudkitty_policy_file is defined %},
{
"source": "{{ container_config_directory }}/{{ cloudkitty_policy_file }}",
"dest": "/etc/cloudkitty/{{ cloudkitty_policy_file }}",
"owner": "cloudkitty",
"perm": "0600"
}{% endif %}
],
"permissions": [
{
"path": "/var/log/kolla/cloudkitty",
"owner": "cloudkitty:cloudkitty",
"recurse": true
}
]
}