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

<creole>
    <files/>
    <containers>
        <container name='domaine' id='27'>
            <service>ntpsec</service>
            <service_access service='ntpsec'>
                <port protocol='udp'>123</port>
                <tcpwrapper>ntpd</tcpwrapper>
            </service_access>
            <package>eole-ntp-server-pkg</package>
            <file name='/etc/ntpsec/ntp.conf'/>
            <file name='/etc/default/ntpdate'/>
            <file name='/etc/apparmor.d/local/usr.sbin.ntpd' source="ntpd.apparmor.conf"/>
            <file name='/etc/systemd/system/ntp.service.d/override.conf' source='ntp.override.container' instance_mode="when_container" mkdir="True"/>
            <file name='/etc/network/if-up.d/ntpdate' source="ntpdate.if-up" mode="755"/>
        </container>
    </containers>
    <variables>
        <family name='services'>
            <variable name='activer_serveur_ntp' type='oui/non' description='Activer le serveur de temps' hidden='True'>
                <value>oui</value>
            </variable>
            <variable name='keep_timesyncd' type='oui/non' description='Variable calculée pour l’activation de timesyncd'/>
        </family>
        <family name='NTP'>
            <variable name='ntp_samba' type='ip' description='Adresse du serveur NTP de référence en mode AD' mandatory='True'/>
        </family>
    </variables>
    <constraints>
        <auto name='calc_multi_condition' target='keep_timesyncd'>
            <param>['non', 'oui']</param>
            <param name='operator'>OR</param>
            <param name='condition_1' type='eole'>activer_serveur_ntp</param>
            <param name='condition_2' type='eole'>mode_conteneur_actif</param>
            <param name='match'>oui</param>
            <param name='mismatch'>non</param>
        </auto>
        <fill name='calc_val' target='ntp_samba'>
            <param type="eole">container_ip_domaine</param>
        </fill>
        <condition name='disabled_if_in' source='keep_timesyncd'>
            <param>non</param>
            <target type='filelist'>timesyncd</target>
            <target type='servicelist'>timesyncd</target>
        </condition>
    </constraints>
    <help/>
</creole>
<!-- vim: ts=4 sw=4 expandtab
-->

