On Mar 12, 2014, at 12:40 PM, puppetstan <[email protected]> wrote:

> Hello 
> 
> I have define in my server.pp file diferent zone and I defined my dns servers 
> (resolv_servers). for my /etc/resolv.conf for this zone 
> 
> 
> #Zone 1
>         if $::ipaddress =~ /^172.17.3./ {
>         $ntp_heure = "ntp.domain.fr"
>         $fusioninventory_proxy = "http://proxy.domain.fr:8080";
>         $resolv_servers = [ '172.30.12.11', '172.30.12.2' ]
>         $resolv_search = "domain.fr"
>         $yumconf_proxy = "http://proxy.domain.fr:8080";
>         $yumconf_exclude = "kernel*"
>         include base::minimal
>         }
> 
> The problem is that in this zone one server (172.17.3.4) that does not have 
> the same dns. Is it possible to make an exclusion on this server and specify 
> other addresses ips in this config file? 
> 
> thank you in advance

One way to add an exclusion for a single value is to use a selector to assign a 
unique value for $resolv_servers based on ip address. Non-matching hosts get 
the default.

if $::ipaddress =~ /^172.17.3./ {
    $ntp_heure = "ntp.domain.fr"
    $fusioninventory_proxy = "http://proxy.domain.fr:8080";
    $resolv_servers = $::ipaddress ? {
        '172.17.3.4' => [ 'a.b.c.d', 'w.x.y.z' ],
        default => [ '172.30.12.11', '172.30.12.2' ],
    }
    $resolv_search = "domain.fr"
    $yumconf_proxy = "http://proxy.domain.fr:8080";
    $yumconf_exclude = "kernel*"
    include base::minimal
}

--
Peter Bukowinski

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/90C33C86-BCB2-4467-96FA-FBE77E03D75E%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to