ninepacker/dicos/90_ninepacker.xml

151 lines
7.1 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<creole>
<files>
<file filelist='ninepacker' name='/etc/eole/eole-db.d/ninepacker-db.yml' rm='True' mkdir='True'/>
</files>
<containers>
<container name='web'>
<!--
<package>ninepacker-apps</package>
-->
<!-- service de configuration apache -->
<service method="apache" servicelist="ninepacker">ninepacker</service>
<!-- template -->
<file filelist='ninepacker' name='/etc/apache2/sites-available/ninepacker' source='ninepacker-apache.conf' />
<file filelist='ninepacker' name='/var/www/html/ninepacker/.env.local' source='ninepacker-env.local' rm='True'/>
<file filelist='ninepacker' name='/etc/cron.d/ninepacker' source='ninepacker.cron' rm='True'/>
</container>
</containers>
<variables>
<family name='ninepacker'>
<variable name='activer_ninepacker' type='oui/non' description='Activer ninepacker'>
<value>oui</value>
</variable>
<variable type='string' name='ninepacker_mode_auth' description="Mode Authentification" mandatory='True'><value>SQL</value></variable>
<!-- EMAIL -->
<variable type='string' name='ninepacker_noreply' description='Adresse mail utilisé pour le noreply' mandatory='True' />
<variable type="oui/non" name='ninepacker_activer_localmail' description="Utiliser le serveur d'envoi de mail local" mandatory='True'>
<value>oui</value>
</variable>
<variable type='string' name='ninepacker_smtphost' description='Host du serveur SMTP' mandatory='True' />
<variable type='string' name='ninepacker_smtpport' description='Port du serveur SMTP' mandatory='True' />
<variable type='string' name='ninepacker_smtpuser' description='Compte du serveur SMTP' mandatory='True' />
<variable type='string' name='ninepacker_smtppwd' description='Mot de passe associé du compte SMTP' mandatory='True' />
<variable type='string' name='ninepacker_smtpencryption' description='Type Encryptage du serveur SMTP' mandatory='True' />
<variable type='string' name='ninepacker_smtpauthmode' description='Mode Authentification du serveur SMTP' mandatory='True' />
<!-- BDD -->
<variable type='string' name='ninepacker_db_mode' description='Serveur de bases de données à utiliser' mode='expert'/>
<variable type='string' name='ninepacker_dbserver' description='Adresse du serveur de base de données' mode='expert'/>
<variable type='number' name='ninepacker_dbport' description="Port d'écoute du serveur de base de données" mode='expert'/>
<variable type='string' name='ninepacker_allow_hosts' description="Hôtes autorisés à utiliser la base de données" multi='True' mode='expert'/>
<variable type='string' name='ninepacker_dbuser' description='Utilisateur du serveur de base de données' mode='expert'/>
<variable type='string' name='ninepacker_dbpass' description='Fichier de mot de passe du serveur' mode='expert'/>
</family>
<separators>
<separator name="ninepacker_noreply">Paramètres associés aux Mails</separator>
<separator name="ninepacker_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'>ninepacker</target>
<target type='servicelist'>ninepacker</target>
</condition>
<!-- AFFICHAGE EN FONCTION DE ninepacker -->
<condition name='hidden_if_in' source='activer_ninepacker'>
<param>non</param>
<target type='variable'>ninepacker_mode_auth</target>
<target type='variable'>ninepacker_noreply</target>
<target type='variable'>ninepacker_activer_localmail</target>
<target type='variable'>ninepacker_smtphost</target>
<target type='variable'>ninepacker_smtpport</target>
<target type='variable'>ninepacker_smtpuser</target>
<target type='variable'>ninepacker_smtppwd</target>
<target type='variable'>ninepacker_smtpencryption</target>
<target type='variable'>ninepacker_smtpauthmode</target>
<target type='variable'>ninepacker_db_mode</target>
<target type='variable'>ninepacker_dbserver</target>
<target type='variable'>ninepacker_dbport</target>
<target type='variable'>ninepacker_allow_hosts</target>
<target type='variable'>ninepacker_dbuser</target>
<target type='variable'>ninepacker_dbpass</target>
<target type='filelist'>ninepacker</target>
<target type='servicelist'>ninepacker</target>
</condition>
<!-- AFFICHAGE EN FONCTION DU MAIL -->
<fill name='concat' target='ninepacker_noreply'>
<param>noreply@</param>
<param type='eole'>domaine_messagerie_etab</param>
</fill>
<condition name='hidden_if_in' source='ninepacker_activer_localmail'>
<param>oui</param>
<target type='variable'>ninepacker_smtphost</target>
<target type='variable'>ninepacker_smtpport</target>
<target type='variable'>ninepacker_smtpuser</target>
<target type='variable'>ninepacker_smtppwd</target>
<target type='variable'>ninepacker_smtpencryption</target>
<target type='variable'>ninepacker_smtpauthmode</target>
</condition>
<!-- AFFICHAGE EN FONCTION DU MODE DE BDD -->
<condition name='disabled_if_in' source='ninepacker_db_mode'>
<param>local</param>
<target type='variable'>ninepacker_dbserver</target>
<target type='variable'>ninepacker_dbuser</target>
<target type='variable'>ninepacker_dbport</target>
<target type='variable'>ninepacker_dbpass</target>
</condition>
<condition name='disabled_if_in' source='ninepacker_db_mode'>
<param>default</param>
<target type='variable'>ninepacker_dbserver</target>
<target type='variable'>ninepacker_dbuser</target>
<target type='variable'>ninepacker_dbport</target>
<target type='variable'>ninepacker_dbpass</target>
<target type='variable'>ninepacker_allow_hosts</target>
</condition>
<check name='valid_enum' target='ninepacker_mode_auth'>
<param>['CAS', 'SQL']</param>
</check>
<check name='valid_enum' target='ninepacker_smtpencryption'>
<param>['tls', 'ssl', 'null']</param>
</check>
<check name='valid_enum' target='ninepacker_smtpauthmode'>
<param>['plain', 'login', 'cram-md5', 'null']</param>
</check>
<check name='valid_enum' target='ninepacker_db_mode'>
<param>['default', 'externe', 'local']</param>
</check>
</constraints>
<help>
<variable name='activer_ninepacker'>Application packer nine</variable>
</help>
</creole>