<?xml version='1.0' encoding='utf-8'?>

<creole>

    <files>
        <file name="/etc/ewt/appdata/ead/config.json" source="config_ead.json" mkdir="True" filelist='ead3'/>
        <file name='/etc/eole/flask/available/ead3fileserver.conf' source='ead3fileserver.conf' filelist='ead3'/>
        <file name="/srv/salt/top.sls" mkdir="True" filelist='ead3'/>
        <file name="/var/lib/eole/config/ead3.cfg" source="ead3.services.cfg" filelist='ead3'/>
        <file name='/etc/nginx/web.d/ead3.conf' source='ead3.nginx.conf' mkdir='True' rm='True' filelist='ead3' />
        <file name='/etc/apache2/sites-available/ead3.conf' source='ead3.apache.conf' rm='True' filelist='ead3_apache' />
        <file name='/etc/nginx/sites-enabled/ead3_apache.conf' source='ead3.apache_nginx.conf' rm='True' filelist='ead3_nginx' />
        <service_access service='ead3'>
            <port service_accesslist='ead3'>443</port>
        </service_access>
        <service method='apache' servicelist='ead3_apache'>ead3</service>
    </files>

    <variables>

        <family name='Services'>
            <variable name='activer_ead3' type='oui/non' description='Activer l’interface d’administration du module (EAD3)' mode='expert'>
                <value>non</value>
            </variable>

            <!-- Workaround when eole-web is not installed -->
            <variable name='activer_apache' type='oui/non' exists='False' hidden='True'>
                <value>non</value>
            </variable>

            <variable name='activer_saltstack' redefine='True'/>

            <variable name='ead3_upload_path' type='string' description='Chemin de téléversement des fichiers EAD3' mode='expert'>
                <value>/var/lib/eole/ead3files</value>
            </variable>

        </family>
        <separators/>

    </variables>

    <constraints>

        <!-- User can disable ead3 -->
        <condition name='disabled_if_in' source='activer_ead3'>
            <param>non</param>
            <target type='filelist'>ead3_apache</target>
            <target type='filelist'>ead3_nginx</target>
            <target type='filelist'>ead3</target>
            <target type='servicelist'>ead3_apache</target>
            <target type='service_accesslist'>ead3</target>
        </condition>

        <!-- Do not configure Apache if Apache is disabled -->
        <condition name='disabled_if_in' source='activer_apache'>
            <param>non</param>
            <target type='filelist'>ead3_apache</target>
            <target type='servicelist'>ead3_apache</target>
        </condition>

        <!-- Disable EAD3 will disable SaltStack -->
        <auto name='calc_val_first_value' target='activer_saltstack'>
            <param type='eole' hidden='False'>activer_ead3</param>
            <param>non</param>
        </auto>

    </constraints>

    <help>

        <variable name='activer_ead3'>Publier l’interface d’administration du module sur le port standard HTTPS (443)</variable>
        <variable name='ead3_upload_path'>Chemin absolu (commençant par un /) vers lequel sont téléversés les fichiers provenant de l'action "Gestion de fichier"</variable>

    </help>

</creole>
<!-- vim: ts=4 sw=4 expandtab
-->
