{% 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"
        }{% if vitrage_policy_file is defined %},
        {
            "source": "{{ container_config_directory }}/{{ vitrage_policy_file }}",
            "dest": "/etc/vitrage/{{ vitrage_policy_file }}",
            "owner": "vitrage",
            "perm": "0600"
        }{% endif %}
    ],
    "permissions": [
        {
            "path": "/var/log/kolla/vitrage",
            "owner": "vitrage:vitrage",
            "recurse": true
        }
    ]
}
