kolla-ansible/ansible/roles/panko/templates/panko-api.json.j2
Dai Dang Van 4f8eb892c7 Support policy.yaml file [part 5]
- Freezer
- Gnocchi
- Kuryr
- Murano
- Panko

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

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

33 lines
1.1 KiB
Django/Jinja

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