{% set apache_binary = 'apache2' if kolla_base_distro in ['ubuntu', 'debian'] else 'httpd' %}
{% set aodh_dir = 'apache2/conf-enabled' if kolla_base_distro in ['ubuntu', 'debian'] else 'httpd/conf.d' %}
{% set command = ('/usr/sbin/' + apache_binary + ' -DFOREGROUND') if aodh_wsgi_provider == 'apache' else 'uwsgi /etc/aodh/aodh-api-uwsgi.ini' %}
{
    "command": "{{ command }}",
    "config_files": [
        {
            "source": "{{ container_config_directory }}/aodh.conf",
            "dest": "/etc/aodh/aodh.conf",
            "owner": "aodh",
            "perm": "0600"
        }{% if aodh_wsgi_provider == "apache" %},
        {
            "source": "{{ container_config_directory }}/wsgi-aodh.conf",
            "dest": "/etc/{{ aodh_dir }}/wsgi-aodh.conf",
            "owner": "root",
            "perm": "0600"
        }{% elif aodh_wsgi_provider == 'uwsgi' %},
        {
            "source": "{{ container_config_directory }}/aodh-api-uwsgi.ini",
            "dest": "/etc/aodh/aodh-api-uwsgi.ini",
            "owner": "aodh",
            "perm": "0600"
        }{% endif %}{% if aodh_policy_file is defined %},
        {
            "source": "{{ container_config_directory }}/{{ aodh_policy_file }}",
            "dest": "/etc/aodh/{{ aodh_policy_file }}",
            "owner": "aodh",
            "perm": "0600"
        }{% endif %}{% if kolla_copy_ca_into_containers | bool %},
        {
            "source": "{{ container_config_directory }}/ca-certificates",
            "dest": "/var/lib/kolla/share/ca-certificates",
            "owner": "root",
            "perm": "0600"
        }{% endif %}
    ],
    "permissions": [
       {
            "path": "/var/log/kolla/aodh",
            "owner": "aodh:kolla",
            "recurse": true
       }
  ]
}
