{% set letsencrypt_apache_dir = 'apache2/conf-enabled' if kolla_base_distro in ['ubuntu', 'debian'] else 'httpd/conf.d' %}
{% set apache_binary = 'apache2' if kolla_base_distro in ['ubuntu', 'debian'] else 'httpd' %}

{
    "command": "/usr/sbin/{{ apache_binary }} -DFOREGROUND",
    "config_files": [
        {
            "source": "{{ container_config_directory }}/letsencrypt-webserver.conf",
            "dest": "/etc/{{ letsencrypt_apache_dir }}/letsencrypt-webserver.conf",
            "owner": "letsencrypt",
            "perm": "0600"
        }{% 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 %}
    ]
}
