ninebadge/dicos/90_ninebadge.xml

155 lines
7.6 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<creole>
<files>
<file filelist='ninebadge' name='/etc/eole/eole-db.d/ninebadge-db.yml' rm='True' mkdir='True'/>
</files>
<containers>
<container name='web'>
<!--
<package>ninebadge-apps</package>
-->
<!-- service de configuration apache -->
<service method="apache" servicelist="ninebadge">ninebadge</service>
<!-- template -->
<file filelist='ninebadge' name='/etc/apache2/sites-available/ninebadge' source='ninebadge-apache.conf' />
<file filelist='ninebadge' name='/var/www/html/ninebadge/.env.local' source='ninebadge-env.local' rm='True'/>
<file filelist='ninebadge' name='/etc/cron.d/ninebadge' source='ninebadge.cron' rm='True'/>
</container>
</containers>
<variables>
<family name='ninebadge'>
<variable name="ninegate_test_ninegate" type="oui/non" hidden='True' exists='False'><value>non</value></variable>
<variable name='activer_ninebadge' type='oui/non' description='Activer Ninebadge'>
<value>oui</value>
</variable>
<variable type='string' name='ninebadge_mode_auth' description="Mode Authentification" mandatory='True'><value>CAS</value></variable>
<variable type='string' name='ninebadge_schedule_url' description="URL de Schedule" mandatory='True'><value></value></variable>
<variable type='string' name='ninebadge_schedule_key' description="API key de Schedule" mandatory='True'><value></value></variable>
<!-- EMAIL -->
<variable type='string' name='ninebadge_noreply' description='Adresse mail utilisé pour le noreply' mandatory='True' />
<variable type="oui/non" name='ninebadge_activer_localmail' description="Utiliser le serveur d'envoi de mail local" mandatory='True'>
<value>oui</value>
</variable>
<variable type='string' name='ninebadge_smtphost' description='Host du serveur SMTP' mandatory='True' />
<variable type='string' name='ninebadge_smtpport' description='Port du serveur SMTP' mandatory='True' />
<variable type='string' name='ninebadge_smtpuser' description='Compte du serveur SMTP' mandatory='True' />
<variable type='string' name='ninebadge_smtppwd' description='Mot de passe associé du compte SMTP' mandatory='True' />
<variable type='string' name='ninebadge_smtpencryption' description='Type Encryptage du serveur SMTP' mandatory='True' />
<variable type='string' name='ninebadge_smtpauthmode' description='Mode Authentification du serveur SMTP' mandatory='True' />
<!-- BDD -->
<variable type='string' name='ninebadge_db_mode' description='Serveur de bases de données à utiliser' mode='expert'/>
<variable type='string' name='ninebadge_dbserver' description='Adresse du serveur de base de données' mode='expert'/>
<variable type='number' name='ninebadge_dbport' description="Port d'écoute du serveur de base de données" mode='expert'/>
<variable type='string' name='ninebadge_allow_hosts' description="Hôtes autorisés à utiliser la base de données" multi='True' mode='expert'/>
<variable type='string' name='ninebadge_dbuser' description='Utilisateur du serveur de base de données' mode='expert'/>
<variable type='string' name='ninebadge_dbpass' description='Fichier de mot de passe du serveur' mode='expert'/>
</family>
<separators>
<separator name="ninebadge_ldaptemplate">Paramètres associés à l'Annuaire</separator>
<separator name="ninebadge_noreply">Paramètres associés aux Mails</separator>
<separator name="ninebadge_db_mode">Paramètres associés à la Base de Données</separator>
</separators>
</variables>
<constraints>
<!-- AFFICHAGE EN FONCTION DE APACHE -->
<condition name='hidden_if_in' source='activer_apache'>
<param>non</param>
<target type='filelist'>ninebadge</target>
<target type='servicelist'>ninebadge</target>
</condition>
<!-- AFFICHAGE EN FONCTION DE Ninebadge -->
<condition name='hidden_if_in' source='activer_ninebadge'>
<param>non</param>
<target type='variable'>ninebadge_mode_auth</target>
<target type='variable'>ninebadge_schedule_url</target>
<target type='variable'>ninebadge_schedule_key</target>
<target type='variable'>ninebadge_noreply</target>
<target type='variable'>ninebadge_activer_localmail</target>
<target type='variable'>ninebadge_smtphost</target>
<target type='variable'>ninebadge_smtpport</target>
<target type='variable'>ninebadge_smtpuser</target>
<target type='variable'>ninebadge_smtppwd</target>
<target type='variable'>ninebadge_smtpencryption</target>
<target type='variable'>ninebadge_smtpauthmode</target>
<target type='variable'>ninebadge_db_mode</target>
<target type='variable'>ninebadge_dbserver</target>
<target type='variable'>ninebadge_dbport</target>
<target type='variable'>ninebadge_allow_hosts</target>
<target type='variable'>ninebadge_dbuser</target>
<target type='variable'>ninebadge_dbpass</target>
<target type='filelist'>ninebadge</target>
<target type='servicelist'>ninebadge</target>
</condition>
<!-- AFFICHAGE EN FONCTION DU MAIL -->
<fill name='concat' target='ninebadge_noreply'>
<param>noreply@</param>
<param type='eole'>domaine_messagerie_etab</param>
</fill>
<condition name='hidden_if_in' source='ninebadge_activer_localmail'>
<param>oui</param>
<target type='variable'>ninebadge_smtphost</target>
<target type='variable'>ninebadge_smtpport</target>
<target type='variable'>ninebadge_smtpuser</target>
<target type='variable'>ninebadge_smtppwd</target>
<target type='variable'>ninebadge_smtpencryption</target>
<target type='variable'>ninebadge_smtpauthmode</target>
</condition>
<!-- AFFICHAGE EN FONCTION DU MODE DE BDD -->
<condition name='disabled_if_in' source='ninebadge_db_mode'>
<param>local</param>
<target type='variable'>ninebadge_dbserver</target>
<target type='variable'>ninebadge_dbuser</target>
<target type='variable'>ninebadge_dbport</target>
<target type='variable'>ninebadge_dbpass</target>
</condition>
<condition name='disabled_if_in' source='ninebadge_db_mode'>
<param>default</param>
<target type='variable'>ninebadge_dbserver</target>
<target type='variable'>ninebadge_dbuser</target>
<target type='variable'>ninebadge_dbport</target>
<target type='variable'>ninebadge_dbpass</target>
<target type='variable'>ninebadge_allow_hosts</target>
</condition>
<!-- VALID EMUN DES DIFFRENTES COMBO -->
<check name='valid_enum' target='ninebadge_mode_auth'>
<param>['CAS', 'SQL']</param>
</check>
<check name='valid_enum' target='ninebadge_smtpencryption'>
<param>['tls', 'ssl', 'null']</param>
</check>
<check name='valid_enum' target='ninebadge_smtpauthmode'>
<param>['plain', 'login', 'cram-md5', 'null']</param>
</check>
<check name='valid_enum' target='ninebadge_db_mode'>
<param>['default', 'externe', 'local']</param>
</check>
</constraints>
</creole>