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

<creole>
    <containers>
        <container name='fichier' id='12'>
            <disknod>/home</disknod>
            <interface linkto="eth1" ip="adresse_ip_fichier_link" mask="adresse_mask_fichier_link" bcast="adresse_bcast_fichier_link">eth1</interface>
            <service>smbd</service>
            <service>winbind</service>
            <package>eole-ad-dc-member-pkg</package>
            <package>eole-ad-dc-scripts</package>
            <package>seth-education-waitsmb</package>
            <package>seth-education-tools</package>
            <file name='/etc/nsswitch.conf'/>
            <file name='/var/lib/samba/private/krb5.conf' source="krb5-member.conf"/>
            <file name='/usr/share/samba/setup/krb5.conf' source="krb5-member.conf"/>
            <file name='/etc/logrotate.d/samba' source='samba.logrotate'/>
            <file name='/etc/samba/conf.d/defaultdomain.global' mkdir="True"/>
            <file name='/etc/samba/conf.d/interface.global' source="interface_member.global"/>
            <file name='/etc/samba/smb.conf' source='smb-ad-member.conf'/>
            <file name='/etc/eole/samba4-vars.conf' source="samba4-vars-member.conf"/>
            <file name='/etc/krb5.conf' source="krb5-member.conf"/>
            <file filelist='ad-recycle-files' name='/etc/samba/recycle.conf' rm='True'/>
            <host name='ad_calc_dc_domainname' ip='container_ip_domaine' instance_mode='when_container' crossed='False' comment='serveurs d’authentification'/>
            <host name='ad_realm' ip='container_ip_domaine' instance_mode='when_container' crossed='False' comment='serveurs d’authentification'/>
            <host name='nom_serveur_krb' ip='container_ip_domaine' instance_mode='when_container' crossed='False' comment='serveurs d’authentification'/>
            <fstab name='/home'/>
        </container>
        <container name='web'>
            <file name='/etc/samba/smb.conf' source='smb-ad-master.conf'/>
        </container>
        <container name='domaine'>
            <interface linkto="eth1" ip="adresse_ip_domaine_link" mask="adresse_mask_domaine_link" bcast="adresse_bcast_domaine_link" redefine='True'>eth1</interface>
            <file name='/etc/samba/conf.d/interface.global' mkdir="True"/>
            <package>ipset</package>
        </container>
        <container name='proxy'>
            <package>seth-education-waitsmb</package>
            <host name='ad_calc_dc_domainname' ip='container_ip_domaine' instance_mode='when_container' crossed='False' comment='serveurs d’authentification'/>
            <host name='ad_realm' ip='container_ip_domaine' instance_mode='when_container' crossed='False' comment='serveurs d’authentification'/>
            <host name='nom_serveur_krb' ip='container_ip_domaine' instance_mode='when_container' crossed='False' comment='serveurs d’authentification'/>
        </container>
        <container name="dns" group="addc"/>
    </containers>
    <files>
        <service>winbind</service>
        <file name='/etc/samba/smb.conf' source='smb-ad-master.conf'/>
        <file name='/etc/samba/lmhosts' source="lmhosts-master"/>
        <file name='/etc/krb5.conf' source="krb5-member.conf"/>
    </files>

    <variables>
        <family name='general'>
            <variable name='nombre_interfaces' redefine='True' mode='normal'/>
            <variable name='eole_module' redefine='True'>
                <value>amonecole</value>
            </variable>
        </family>
        <family name='services'>
            <variable name='activer_dhcprelay' redefine='True' hidden='True'/>
            <variable name='activer_client_ldap' redefine='True' hidden='True'/>
            <variable name='activer_clam' redefine='True'>
                <value>oui</value>
            </variable>
        </family>

        <family name='système'>

            <!-- We need to recalculate the variables -->
            <variable name='eole_lv_names' redefine='True' remove_check='True' />
            <variable name='eole_lv_standard_extends' redefine='True' remove_check='True' />

        </family>

        <family name='wpad'>
            <variable name="wpad_domains" redefine="True" hidden="True"/>
        </family>

        <family name='firewall'>
            <variable name='type_amon' redefine='True'>
                <value>2zones-amonecole</value>
            </variable>
            <variable name='install_scribe_dmz' redefine='True' hidden='True'/>
            <variable name='use_iptables_restore' redefine='True' hidden='True'>
                <value>non</value>
            </variable>
        </family>
        <family name='Interface-0'>
            <variable name='eth0_method' redefine='True' hidden='False'/>
        </family>
        <family name='Interface-1'>
            <variable name='adresse_ip_fichier_link' type='ip' description="Adresse IP pour le serveur de fichiers" mandatory='True'/>
            <variable name='adresse_mask_fichier_link' type='netmask' description="Masque de sous réseau pour le serveur de fichiers" mandatory='True' mode='expert'/>
            <variable name='adresse_bcast_fichier_link' type='broadcast' description="Broadcast pour le serveur de fichiers" mandatory='True'/>
            <!--change les variables de famille-->
            <variable name='adresse_ip_domaine_link' remove_check="True" redefine="True"/>
            <variable name='adresse_mask_domaine_link' redefine="True" />
            <variable name='adresse_bcast_domaine_link' redefine="True" />
        </family>
        <family name='tftp'>
            <variable name='adresse_ip_tftp' redefine="True" />
        </family>
        <family name='Reverse proxy'>
            <variable name='activer_revprox_ead' redefine='True' hidden='True'/>
        </family>
        <family name='ead-web' mode='expert'>
            <!-- mis à oui dans 30_scribe.xml -->
            <variable name='activer_ead_reverseproxy' redefine='True'>
                <value>non</value>
            </variable>
        </family>
        <family name='authentification'>
            <!-- authentification web activée par défaut sur AmonEcole #1965 -->
            <variable name='activer_squid_auth' redefine='True' mode='normal'>
                <value>oui</value>
            </variable>
        </family>
        <family name='applications web'>
            <variable name='activer_web_behind_revproxy' redefine='True' hidden='True'>
                <value>oui</value>
            </variable>
        </family>
        <family name='mysql'>
            <variable name='mysql_open_firewall' redefine='True' hidden='True'/>
        </family>
        <family name='proxy authentifié'>
            <variable name='type_squid_auth' redefine='True' mode='normal'>
                <value>NTLM/KERBEROS</value>
            </variable>
            <variable name='nom_serveur_krb' redefine="True">
                <value>addc</value>
            </variable>
            <variable name='nom_domaine_krb' redefine="True"/>
            <variable name='nom_domaine_windows' redefine="True"/>
            <variable name='ip_serveur_krb' redefine="True"/>
        </family>
        <family name='dhcp'>
            <variable name='adresse_network_dhcp' redefine='True' mode='basic'/>
            <variable name='adresse_netmask_dhcp' redefine='True' mode='basic'/>
            <variable name='global_adresse_ip_dns_dhcp' redefine='True'/>
        </family>
        <family name='Active Directory'>
            <variable name='ad_server_role' redefine='True' hidden='True'/>
            <variable name='ad_additional_dc' redefine='True' remove_condition='True' hidden='True'/>
            <variable name='ad_calc_dc_domainname' type="domain_strict" description="Nom d'hôte du controleur de domaine"/>
            <variable name='ad_server_netbios_name' redefine="True" auto_freeze="False" />
            <variable name='activer_ad_zones' redefine="True">
                <value>oui</value>
            </variable>
            <!--Les profiles sont mis dans $HOME/profiles dans la fiche LDAP-->
            <variable name='activer_ad_profiles_share' redefine='True' hidden='True'>
                <value>non</value>
            </variable>
            <!--Ne pas activer le HOME sur le DC, mais activer les autres variables pour le membre-->
            <variable name='activer_ad_homes_share' redefine='True' hidden='True'>
                <value>non</value>
            </variable>
            <variable name='ad_home_share_path' redefine='True' remove_condition="True"/>
            <variable name='ad_home_share_with_domain_prefix' redefine='True' remove_condition="True"/>
            <variable name='ad_homes_share_recycle' redefine='True' remove_condition="True"/>
            <variable name='smb_quotawarn' redefine='True' hidden='True'/>
        </family>

        <separators>
            <separator name="adresse_ip_fichier_link">Adresse pour le serveur de fichiers</separator>
        </separators>

    </variables>

    <constraints>
        <!-- Adresse IP du serveur LDAP sur eth1 -->
        <!--<auto name='calc_val' target='adresse_ip_ldap_exterieur'>
            <param type='eole' name='valeur'>adresse_ip_eth1</param>
        </auto>-->
        <auto name='calc_val' target='ad_server_netbios_name'>
            <param>addc</param>
        </auto>
        <check name="valid_in_network" target="adresse_ip_fichier_link" level="warning">
            <param type='eole'>adresse_network_eth1</param>
            <param type='eole'>adresse_netmask_eth1</param>
        </check>
        <check name="valid_differ" target="adresse_ip_fichier_link">
            <param type='eole'>adresse_ip_eth1</param>
        </check>
        <check name="valid_differ" target="adresse_ip_fichier_link">
            <param type='eole'>adresse_ip_eth1_proxy_link</param>
        </check>
        <check name="valid_differ" target="nom_machine" level="warning">
            <param>addc</param>
        </check>
        <check name="valid_differ" target="web_url" level="warning">
            <param>addc</param>
        </check>
        <check name="valid_differ" target="nom_machine" level="warning">
            <param type='eole'>ad_server_netbios_name_member</param>
        </check>
        <check name="valid_differ" target="web_url" level="warning">
            <param type='eole'>ad_server_netbios_name_member</param>
        </check>
        <auto name='calc_val' target='ad_homes_share_host'>
            <param type='eole' name='valeur'>ad_server_netbios_name_member</param>
        </auto>
        <auto name='calc_val' target='ad_profiles_share_host'>
            <param type='eole' name='valeur'>ad_server_netbios_name_member</param>
        </auto>
        <auto name='calc_broadcast' target='adresse_bcast_fichier_link'>
            <param type='eole' name='ip'>adresse_ip_fichier_link</param>
            <param type='eole' name='netmask'>adresse_mask_fichier_link</param>
        </auto>
        <!-- AmonEcole >= 2 cartes réseau -->
        <check name="valid_enum" target="nombre_interfaces">
            <param>['2','3','4','5']</param>
        </check>
        <!-- Configuration automatique du proxy sur eth1 -->
        <fill name='calc_val' target='adresse_network_dhcp'>
            <param type='eole' name='valeur'>adresse_network_eth1</param>
        </fill>
        <fill name='calc_val' target='adresse_netmask_dhcp'>
            <param type='eole' name='valeur'>adresse_netmask_eth1</param>
        </fill>
        <fill name='calc_val' target='global_adresse_ip_gw_dhcp'>
            <param type='eole' name='valeur'>adresse_ip_eth1</param>
        </fill>
        <fill name='calc_val' target='global_adresse_ip_dns_dhcp'>
            <param type='eole' name='valeur'>adresse_ip_domaine_link</param>
        </fill>
        <fill name='calc_val' target='adresse_mask_fichier_link'>
            <param type='eole' name='valeur'>adresse_netmask_eth1</param>
        </fill>
        <fill name='calc_val' target='adresse_mask_domaine_link'>
            <param type='eole' name='valeur'>adresse_netmask_eth1</param>
        </fill>
        <!-- Configuration automatique de l'authentification du proxy -->
        <fill name='calc_val' target='nom_serveur_smb'>
            <param type='eole' name='valeur'>ad_server_netbios_name</param>
        </fill>
        <fill name='calc_val' target='nom_domaine_smb'>
            <param type='eole' name='valeur'>ad_domain</param>
        </fill>
        <fill name='calc_container' target='ip_serveur_smb'>
            <param type='eole'>mode_conteneur_actif</param>
            <param type='container'>fichier</param>
            <param type='eole' optional='True'>mode_zephir</param>
        </fill>
        <fill name='calc_val' target='nom_domaine_krb'>
            <param type='eole' name='valeur'>ad_realm</param>
        </fill>
        <fill name='calc_val' target='nom_domaine_windows'>
            <param type='eole' name='valeur'>ad_domain</param>
        </fill>
        <fill name='calc_container' target='ip_serveur_krb'>
            <param type='eole'>mode_conteneur_actif</param>
            <param type='container'>domaine</param>
            <param type='eole' optional='True'>mode_zephir</param>
        </fill>
        <fill name='calc_val' target='activer_revprox'>
            <param type='eole' name='valeur'>activer_apache</param>
        </fill>
        <auto name='calc_val' target='web_behind_revproxy_ip'>
            <param type='eole'>adresse_ip_br0</param>
        </auto>
        <auto name='concat' target='ad_calc_dc_domainname'>
            <param type='eole'>container_name_domaine</param>
            <param>.</param>
            <param type='eole'>ad_realm</param>
        </auto>
        <fill name='calc_multi_condition' target='revprox_auto_config_local_web'>
            <param>oui</param>
            <param type='eole' name='condition_1'>activer_apache</param>
            <param type='eole' name='condition_2'>activer_revprox</param>
            <param name='match'>oui</param>
            <param name='mismatch'>non</param>
        </fill>

        <!-- Default AmonEcole* logical volumes -->
        <auto name='calc_multi_val' target='eole_lv_names'>
            <param>root</param>
            <param>var</param>
            <param>opt</param>
            <param>home</param>
        </auto>

        <!-- Default AmonEcole* logical volumes extension: 100% /home -->
        <auto name='calc_multi_val' target='eole_lv_standard_extends'>
            <param type='number'>0</param>
            <param type='number'>0</param>
            <param type='number'>0</param>
            <param type='number'>100</param>
        </auto>
        <check name="valid_in_network" target="adresse_ip_domaine_link" level="warning">
            <param type='eole'>adresse_network_eth1</param>
            <param type='eole'>adresse_netmask_eth1</param>
        </check>
        <check name="valid_differ" target="adresse_ip_domaine_link">
            <param type='eole'>adresse_ip_eth1</param>
        </check>
        <check name="valid_differ" target="adresse_ip_domaine_link">
            <param type='eole'>adresse_ip_eth1_proxy_link</param>
        </check>
        <check name="valid_differ" target="adresse_ip_domaine_link">
            <param type='eole'>adresse_ip_fichier_link</param>
        </check>
        <fill name='calc_val' target='adresse_ip_tftp'>
            <param type='eole' name='valeur'>adresse_ip_fichier_link</param>
        </fill>
        <condition name='disabled_if_in' source="ad_additional_dc">
            <param>non</param>
            <target type='filelist'>ad_additional_dc</target>
        </condition>
    </constraints>
    <help/>
</creole>
<!-- vim: ts=4 sw=4 expandtab
-->
