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

<creole>

    <files>
        <file name='/etc/apparmor.d/local/usr.sbin.named' source="named.apparmor.conf"/>
    </files>

    <containers>
        <container name="dns" id='18'>
            <package>eole-dns-pkg</package>
            <service>named</service>
            <service_access service='named'>
                <port>53</port>
                <port protocol='udp'>53</port>
            </service_access>
            <service_restriction service='named'>
                <ip service_restrictionlist='named_eth0' interface='eth0' netmask='0.0.0.0'>0.0.0.0</ip>
                <ip interface='eth1' netmask='0.0.0.0'>0.0.0.0</ip>
                <ip interface='eth2' netmask='0.0.0.0'>0.0.0.0</ip>
                <ip interface='eth3' netmask='0.0.0.0'>0.0.0.0</ip>
                <ip interface='eth4' netmask='0.0.0.0'>0.0.0.0</ip>
            </service_restriction>
            <file name='/etc/bind/named.conf'/>
            <file name='/etc/bind/forward.zones'/>
            <file name='/etc/default/named'/>
            <file name='/etc/systemd/system/named.service.d/override.conf' source='named.override' mkdir='True'/>
            <file filelist='agriates' name='/etc/bind/agriates.zones'/>
        </container>
    </containers>

    <variables>

        <family name='services'>
            <variable name='activer_bind' type='oui/non' description='Activer le service bind' hidden='True'>
                <value>oui</value>
            </variable>
        </family>

        <family name='Interface-0'>
            <variable name='activer_dns_eth0' type='oui/non' description="Activer le serveur DNS sur cette zone">
                <value>oui</value>
            </variable>
            <variable name='dns_master_eth0' type='oui/non' description="Serveur master DNS sur cette zone" >
                <value>non</value>
            </variable>
        </family>
        <family name='Interface-1'>
            <variable name='dns_master_eth1' type='oui/non' description="Serveur master DNS de cette zone" >
                <value>oui</value>
            </variable>
            <variable name='dns_rvp_eth1' type='oui/non' description="Autoriser cette zone à utiliser les DNS de Forward RVP/AGRIATES" >
                <value>oui</value>
            </variable>
            <variable name='dns_forward_eth1' type='oui/non' description="Autoriser cette zone à utiliser les DNS des zones forward additionnelles" >
                <value>oui</value>
            </variable>
        </family>
        <family name='Interface-2'>
            <variable name='dns_master_eth2' type='oui/non' description="Serveur master DNS de cette zone" >
                <value>oui</value>
            </variable>
            <variable name='dns_rvp_eth2' type='oui/non' description="Autoriser cette zone à utiliser les DNS de Forward RVP/AGRIATES" >
                <value>non</value>
            </variable>
            <variable name='dns_forward_eth2' type='oui/non' description="Autoriser cette zone à utiliser les DNS des zones forward additionnelles" >
                <value>oui</value>
            </variable>
        </family>
        <family name='Interface-3'>
            <variable name='dns_master_eth3' type='oui/non' description="Serveur master DNS de cette zone" >
                <value>oui</value>
            </variable>
            <variable name='dns_rvp_eth3' type='oui/non' description="Autoriser cette zone à utiliser les DNS de Forward RVP/AGRIATES" >
                <value>non</value>
            </variable>
            <variable name='dns_forward_eth3' type='oui/non' description="Autoriser cette zone à utiliser les DNS des zones forward additionnelles" >
                <value>oui</value>
            </variable>
        </family>
        <family name='Interface-4'>
            <variable name='dns_master_eth4' type='oui/non' description="Serveur master DNS de cette zone" >
                <value>oui</value>
            </variable>
            <variable name='dns_rvp_eth4' type='oui/non' description="Autoriser cette zone à utiliser les DNS de Forward RVP/AGRIATES" >
                <value>non</value>
            </variable>
            <variable name='dns_forward_eth4' type='oui/non' description="Autoriser cette zone à utiliser les DNS des zones forward additionnelles" >
                <value>oui</value>
            </variable>
        </family>
        <family name='zones-dns' mode='expert' icon='random'>
            <variable name='nom_domaine_local_supp' type='domain_strict' description='Nom domaine local supplémentaire ou rien' multi='True' />
            <variable name='activer_zone_forward' type='oui/non' description='Déclarer des zones DNS à forwarder'>
                <value>non</value>
            </variable>
            <variable name='nom_zone_forward' type='domain_strict' description='Nom DNS de la zone' multi='True' mandatory='True'/>
            <variable name='ip_dns_zone_forward' type='ip' description='Adresse IP du serveur DNS de la zone' mandatory='True'/>
        </family>
        <family name='rvp' hidden='True'>
            <variable name='install_rvp' exists='False' type='oui/non'>
                <value>non</value>
            </variable>
            <variable name='agriates_member' exists='False' type='oui/non'>
                <value>non</value>
            </variable>
            <variable name='adresse_dns_agriates' type='ip' description='Adresse du DNS permettant de resoudre les in.ac-acad.fr' multi='True'/>
            <variable name='nom_zone_forward_rvp' type='domain_strict' description='Nom DNS de la zone resolue par le DNS AGRIATES' multi='True'/>
        </family>
        <separators>
            <separator name='activer_dns_eth0'>Configuration DNS sur l'interface</separator>
            <separator name='dns_master_eth1'>Configuration DNS sur l'interface</separator>
            <separator name='dns_master_eth2'>Configuration DNS sur l'interface</separator>
            <separator name='dns_master_eth3'>Configuration DNS sur l'interface</separator>
            <separator name='dns_master_eth4'>Configuration DNS sur l'interface</separator>
            <separator name='nom_domaine_local_supp'>Ajout de domaines locaux supplémentaires (DNS master sur ces domaines)</separator>
            <separator name='activer_zone_forward'>Forward de zones DNS</separator>
        </separators>
    </variables>

    <constraints>
        <group master='nom_zone_forward'>
            <slave>ip_dns_zone_forward</slave>
        </group>
        <condition name='disabled_if_in' source='activer_zone_forward'>
            <param>non</param>
            <target type='variable'>nom_zone_forward</target>
            <target type='variable'>ip_dns_zone_forward</target>
        </condition>
        <condition name='disabled_if_in' source='agriates_member'>
            <param>non</param>
            <target type='variable'>adresse_dns_agriates</target>
            <target type='filelist'>agriates</target>
        </condition>
        <condition name='disabled_if_in' source='activer_dns_eth0'>
            <param>non</param>
            <target type='variable'>dns_master_eth0</target>
            <target type='service_restrictionlist'>named_eth0</target>
        </condition>
        <condition name='disabled_if_in' source='alias_eth1'>
            <param>non</param>
            <target type='variable'>dns_rvp_alias_eth1</target>
            <target type='variable'>dns_forward_alias_eth1</target>
        </condition>
        <condition name='disabled_if_in' source='agriates_member'>
            <param>non</param>
            <target type='variable'>dns_rvp_alias_eth1</target>
        </condition>
        <condition name='disabled_if_in' source='install_rvp'>
            <param>non</param>
            <target type='variable'>dns_rvp_eth1</target>
            <target type='variable'>dns_rvp_vlan_eth1</target>
            <target type='variable'>dns_rvp_alias_eth1</target>
        </condition>
        <condition name='disabled_if_in' source='vlan_eth1'>
            <param>non</param>
            <target type='variable'>dns_rvp_vlan_eth1</target>
            <target type='variable'>dns_forward_vlan_eth1</target>
        </condition>
        <condition name='disabled_if_in' source='agriates_member'>
            <param>non</param>
            <target type='variable'>dns_rvp_vlan_eth1</target>
        </condition>
        <condition name='disabled_if_in' source='alias_eth2'>
            <param>non</param>
            <target type='variable'>dns_rvp_alias_eth2</target>
            <target type='variable'>dns_forward_alias_eth2</target>
        </condition>
        <condition name='disabled_if_in' source='agriates_member'>
            <param>non</param>
            <target type='variable'>dns_rvp_alias_eth2</target>
        </condition>
        <condition name='disabled_if_in' source='install_rvp'>
            <param>non</param>
            <target type='variable'>dns_rvp_eth2</target>
            <target type='variable'>dns_rvp_alias_eth2</target>
            <target type='variable'>dns_rvp_vlan_eth2</target>
        </condition>
        <condition name='disabled_if_in' source='vlan_eth2'>
            <param>non</param>
            <target type='variable'>dns_rvp_vlan_eth2</target>
            <target type='variable'>dns_forward_vlan_eth2</target>
        </condition>
        <condition name='disabled_if_in' source='agriates_member'>
            <param>non</param>
            <target type='variable'>dns_rvp_vlan_eth2</target>
        </condition>
        <condition name='disabled_if_in' source='alias_eth3'>
            <param>non</param>
            <target type='variable'>dns_rvp_alias_eth3</target>
            <target type='variable'>dns_forward_alias_eth3</target>
        </condition>
        <condition name='disabled_if_in' source='agriates_member'>
            <param>non</param>
            <target type='variable'>dns_rvp_alias_eth3</target>
        </condition>
        <condition name='disabled_if_in' source='install_rvp'>
            <param>non</param>
            <target type='variable'>dns_rvp_eth3</target>
            <target type='variable'>dns_rvp_alias_eth3</target>
            <target type='variable'>dns_rvp_vlan_eth3</target>
        </condition>
        <condition name='disabled_if_in' source='vlan_eth3'>
            <param>non</param>
            <target type='variable'>dns_rvp_vlan_eth3</target>
            <target type='variable'>dns_forward_vlan_eth3</target>
        </condition>
        <condition name='disabled_if_in' source='agriates_member'>
            <param>non</param>
            <target type='variable'>dns_rvp_vlan_eth3</target>
        </condition>
        <condition name='disabled_if_in' source='alias_eth4'>
            <param>non</param>
            <target type='variable'>dns_rvp_alias_eth4</target>
            <target type='variable'>dns_forward_alias_eth4</target>
        </condition>
        <condition name='disabled_if_in' source='agriates_member'>
            <param>non</param>
            <target type='variable'>dns_rvp_alias_eth4</target>
        </condition>
        <condition name='disabled_if_in' source='install_rvp'>
            <param>non</param>
            <target type='variable'>dns_rvp_eth4</target>
            <target type='variable'>dns_rvp_alias_eth4</target>
            <target type='variable'>dns_rvp_vlan_eth4</target>
        </condition>
        <condition name='disabled_if_in' source='vlan_eth4'>
            <param>non</param>
            <target type='variable'>dns_rvp_vlan_eth4</target>
            <target type='variable'>dns_forward_vlan_eth4</target>
        </condition>
        <condition name='disabled_if_in' source='agriates_member'>
            <param>non</param>
            <target type='variable'>dns_rvp_vlan_eth4</target>
        </condition>
        <condition name='disabled_if_in' source='activer_route'>
            <param>non</param>
            <target type='variable'>dns_route</target>
            <target type='variable'>dns_rvp_route</target>
            <target type='variable'>dns_forward_route</target>
        </condition>
        <condition name='disabled_if_in' source='agriates_member'>
            <param>non</param>
            <target type='variable'>dns_rvp_route</target>
        </condition>
        <condition name='disabled_if_in' source='install_rvp'>
            <param>non</param>
            <target type='variable'>dns_rvp_route</target>
        </condition>
        <condition name='disabled_if_in' source='agriates_member'>
            <param>non</param>
            <target type='variable'>nom_zone_forward_rvp</target>
        </condition>
    </constraints>

    <help>
        <family name='zones-dns'>Personnalisation des zones DNS</family>
    </help>

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