I've been trying to use a resolv_conf recipe to setup the DNS servers based
on $domain and $location (a custom fact).
So I cascade the 2 conditionals, but it's not working. Is it supposed to
work ? Or should I look for an alternative ?
------------------------------------------
resolv_conf { "location_based_resolv":
domainname => "$domain",
searchpath => [$domain],
# Here is the cascaded conditional. If I'm in "domain1" I want to test 3
different locations.
nameservers => $domain ? {
"domain1.local" => $location ? {
"Default-First-Site-Name" => ['10.2.38.10','10.128.38.21'],
"HeadOffice" =>
['10.128.36.20','10.128.36.11'],
default => ['10.128.36.10','10.2.36.21'],
}
"domain2.local" => ['10.128.36.20','10.128.36.10'],
default => ['10.128.36.10','10.2.36.20'],
}
}
------------------------------------------
## If I test only one level it works:
# nameservers => $location ? {
# "Default-First-Site-Name" => ['10.2.38.10','10.128.38.21'],
# "HeadOffice" =>
['10.128.36.20','10.128.36.11'],
# default => ['10.128.36.10','10.2.36.21'],
# }
------------------------------------------
Am I missing something ? Or should I do it differently ?
Cheers,
Marcello
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.