kolla-ansible/ansible/roles/vitrage/templates/vitrage-api.json.j2
chenxing 2d1a1b1df6 Add vitrage ansible role
Co-Authored-By: caoyuan <cao.yuan@99cloud.net>
Co-Authored-By: Eduardo Gonzalez <dabarren@gmail.com>

Depends-on I7ffb991adbd05275e331401cd73fc84362084ebd
Change-Id: I85afeb5dfce0bf6350a444000bdb885c6fe079c9
Partially-implements: blueprint vitrage-roles
2017-12-18 17:29:32 +08:00

35 lines
1.2 KiB
Django/Jinja

{% set apache_cmd = 'apache2' if kolla_base_distro in ['ubuntu', 'debian'] else 'httpd' %}
{% set apache_dir = 'apache2/conf-enabled' if kolla_base_distro in ['ubuntu', 'debian'] else 'httpd/conf.d' %}
{% set apache_file = '000-default.conf' if kolla_base_distro in ['ubuntu', 'debian'] else 'vitrage-api.conf' %}
{
"command": "/usr/sbin/{{ apache_cmd }} -DFOREGROUND",
"config_files": [
{
"source": "{{ container_config_directory }}/vitrage.conf",
"dest": "/etc/vitrage/vitrage.conf",
"owner": "vitrage",
"perm": "0600"
},
{
"source": "{{ container_config_directory }}/wsgi-vitrage.conf",
"dest": "/etc/{{ apache_dir }}/{{ apache_file }}",
"owner": "vitrage",
"perm": "0644"
},
{
"source": "{{ container_config_directory }}/policy.json",
"dest": "/etc/vitrage/policy.json",
"owner": "vitrage",
"perm": "0600",
"optional": true
}
],
"permissions": [
{
"path": "/var/log/kolla/vitrage",
"owner": "vitrage:vitrage",
"recurse": true
}
]
}