<?xml version="1.0" encoding="utf-8"?>
<creole>
    <files>
        <file filelist="eolesso_cluster_client" name="/etc/stunnel/redis_client.conf" source="stunnel_redis_client.conf" rm='True'/>
        <file filelist='eolesso_cluster_client' name='/etc/default/stunnel4' source='stunnel_default' rm='True'/>
    </files>
    <variables>
        <family name='eole sso cluster'>
            <variable name='eolesso_stunnel_server' type='domain' description="Adresse d'accès au service Redis distant (stunnel)" mandatory='True'/>
            <variable name='redis_client_cert' type='filename' description="Chemin du certificat client stunnel (Redis)" mode="expert">
              <value>/etc/ssl/certs/stunnel_client.crt</value>
            </variable>
            <variable name='redis_client_key' type='filename' description="Chemin de la clé du client stunnel (Redis)" mode="expert">
              <value>/etc/ssl/private/stunnel_client.key</value>
            </variable>
        </family>
    </variables>
    <constraints>
        <condition name='disabled_if_in' source='eolesso_cluster_server'>
            <param>oui</param>
            <target type='variable'>eolesso_stunnel_server</target>
            <target type='variable'>redis_client_cert</target>
            <target type='variable'>redis_client_key</target>
            <target type='filelist'>eolesso_cluster_client</target>
        </condition>
    </constraints>
    <help>
        <variable name='eolesso_stunnel_server'>Adresse IP ou DNS du serveur hébergeant Redis</variable>
        <variable name='redis_client_cert'>Chemin du certificat utilisé pour se connecter à Redis.\n Copier la CA associée (/etc/ssl/certs/ca_local.crt par défaut)\ndans le répertoire /etc/stunnel/eole du serveur</variable>
        <variable name='redis_client_key'>Chemin de la clé du Certificat utilisé pour se connecter à Redis</variable>
    </help>
</creole>
