Taking a brief look at extlookup() We have a module to setup resolv.conf based on location so we have a % {domain}.csv file more /etc/puppetlabs/puppet/envs/legacy/extdata/ldt.csv domainname,my.domain.com resolvers,10.10.10.10 10.10.10.11 searchpath,sub.my.domain.com sub2.my.domain.com class resolver::setup { $searchpath = extlookup("searchpath") $resolvers = extlookup("resolvers") $resolvdomainname = extlookup("domainname") } Each value is getting set with the “domainname” value. This is with Puppet v2.6.9 Am I doing something wrong here ? Thanks Paul -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Oct 20, 10:18 am, "Ollies...@googlemail.com" <Paul.Seym...@barcap.com> wrote:> Taking a brief look at extlookup() > > We have a module to setup resolv.conf based on location so we have a % > {domain}.csv fileCan you post your $extlookup_datadir and $extlookup_precedence values?> > more /etc/puppetlabs/puppet/envs/legacy/extdata/ldt.csv > domainname,my.domain.com > resolvers,10.10.10.10 10.10.10.11 > searchpath,sub.my.domain.com sub2.my.domain.com > > class resolver::setup { > $searchpath = extlookup("searchpath") > $resolvers = extlookup("resolvers") > $resolvdomainname = extlookup("domainname") > > }This looks correct.> > Each value is getting set with the “domainname” value.What happens if you change the order of the values in the csv file?> > This is with Puppet v2.6.9 > > Am I doing something wrong here ? > > Thanks > Paul-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Oct 21, 12:55 pm, Andrew Thompson <netengr2...@gmail.com> wrote:> On Oct 20, 10:18 am, "Ollies...@googlemail.com"<Paul.Seym...@barcap.com> wrote: > > Taking a brief look at extlookup() > > > We have a module to setup resolv.conf based on location so we have a % > > {domain}.csv file > > Can you post your $extlookup_datadir and $extlookup_precedence values? >Sure it''s set like this so host based, datacenter, country, region based on custom fact(s) which would out the location based on a subnet lookup to a backend system. # # Global configuration # $extlookup_datadir = "/etc/puppetlabs/puppet/envs/legacy/extdata" $extlookup_precedence = ["%{fqdn}", "%{datacentreid}", "%{ctryid}", "% {rgnid}", "common"]> > > more /etc/puppetlabs/puppet/envs/legacy/extdata/ldt.csv > > domainname,my.domain.com > > resolvers,10.10.10.10 10.10.10.11 > > searchpath,sub.my.domain.com sub2.my.domain.com > > > class resolver::setup { > > $searchpath = extlookup("searchpath") > > $resolvers = extlookup("resolvers") > > $resolvdomainname = extlookup("domainname") > > > } > > This looks correct. > > > > > Each value is getting set with the “domainname” value. > > What happens if you change the order of the values in the csv file? >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Oct 24, 2:25 am, "Ollies...@googlemail.com" <Paul.Seym...@barcap.com> wrote:> On Oct 21, 12:55 pm, Andrew Thompson <netengr2...@gmail.com> wrote:> On Oct 20, 10:18 am, "Ollies...@googlemail.com"<Paul.Seym...@barcap.com> wrote: > > > Taking a brief look at extlookup() > > > > We have a module to setup resolv.conf based on location so we have a % > > > {domain}.csv file > > > Can you post your $extlookup_datadir and $extlookup_precedence values? > > Sure it''s set like this so host based, datacenter, country, region > based on custom fact(s) which would out the location based on a subnet > lookup to a backend system. > > # > # Global configuration > # > $extlookup_datadir = "/etc/puppetlabs/puppet/envs/legacy/extdata" > $extlookup_precedence = ["%{fqdn}", "%{datacentreid}", "%{ctryid}", "% > {rgnid}", "common"]My environment sets the $extlookup_precendence variable a little different: $extlookup_precedence = ["${fqdn}", "${datacentreid}", "${ctryid}", "$ {rgnid}", "common"] I''m not sure of the difference but, the ${} syntax works just fine for us. Also you may want to check that the facts are set properly and keep in mind that they are case sensitive. I make sure that my fqdn is lowercase before doing anything.> > > > > > > > > > > > more /etc/puppetlabs/puppet/envs/legacy/extdata/ldt.csv > > > domainname,my.domain.com > > > resolvers,10.10.10.10 10.10.10.11 > > > searchpath,sub.my.domain.com sub2.my.domain.com > > > > class resolver::setup { > > > $searchpath = extlookup("searchpath") > > > $resolvers = extlookup("resolvers") > > > $resolvdomainname = extlookup("domainname") > > > > } > > > This looks correct. > > > > Each value is getting set with the “domainname” value. > > > What happens if you change the order of the values in the csv file?-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Thanks but it remains the same. Even if I put an ${fqdn}.csv it will read that file but only take the first entry in the CSV and apply that to every extlookup call in the module. It''s a little curious. This is running on PE1.2 but I suspect this is running the same code base as 2.6.9 -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.