{% set monasca_cmd = 'apache2' if kolla_base_distro in ['ubuntu', 'debian'] else 'httpd' %}
{% set wsgi_conf_dir = 'apache2/conf-enabled' if kolla_base_distro in ['ubuntu', 'debian'] else 'httpd/conf.d' %}
{
    "command": "/usr/sbin/{{ monasca_cmd }} -DFOREGROUND",
    "config_files": [
        {
            "source": "{{ container_config_directory }}/api.conf",
            "dest": "/etc/monasca/api.conf",
            "owner": "monasca",
            "perm": "0600"
        },
        {
            "source": "{{ container_config_directory }}/api-config.ini",
            "dest": "/etc/monasca/api-config.ini",
            "owner": "monasca",
            "perm": "0600"
        },
        {
            "source": "{{ container_config_directory }}/wsgi-api.conf",
            "dest": "/etc/{{ wsgi_conf_dir }}/wsgi-config.conf",
            "owner": "monasca",
            "perm": "0600"
        }
    ],
    "permissions": [
        {
            "path": "/var/log/kolla/monasca",
            "owner": "monasca:kolla",
            "recurse": true
        }
    ]
}
