Marcello de Sousa
2011-Apr-19 22:25 UTC
[Puppet Users] Puppet environment can''t be used in extlookup (precedence)
Anyone able to explain why "$fqdn" works and "$environment" doesn''t in: $extlookup_precedence=["%{fqdn}","%{environment}","common"] How to reproduce it: ----------------------------- - In "/etc/puppet/manifests/site.pp" : $extlookup_datadir = "/etc/puppet/manifests/extdata" $extlookup_precedence=["%{fqdn}","%{environment}","common"] - In "/etc/puppet/manifests/extdata/common.csv" extdata1,"CommonData1" extdata2,"CommonData2" - In "/etc/puppet/manifests/extdata/production.csv" extdata1,"ProdEnvData" - In "/etc/puppet/manifests/extdata/myhostname.domain.local.csv" extdata2,"HostData" - In a manifest, test it with: $extdata1 = extlookup(extdata1) $extdata2 = extlookup(extdata2) file{"/tmp/test.txt" : ensure => file, content => "FQDN = ${fqdn} , ENV = ${environment}, extdata1 ${extdata1) , extdata2 = ${extdata2) ", } - At the end, test.txt will contain : FQDN = myhostname.domain.local , ENV = production, extdata1 = CommonData1 , extdata2 = HostData - But I guess the expected result should be: FQDN = myhostname.domain.local , ENV = production, extdata1 = ProdEnvData, extdata2 = HostData What am I missing here ? 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 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.
Marcello de Sousa
2011-Apr-22 10:18 UTC
Re: [Puppet Users] Puppet environment can''t be used in extlookup (precedence)
This is bugging me for a couple of days now as I don''t seem to find a reasonable explanation for the different behavior on the 2 puppet variables. Not sure if it''s a puppet issue or an extlookup issue (or maybe my own issue). Help ? :) On Wed, Apr 20, 2011 at 12:25 AM, Marcello de Sousa <lists@area151.com> wrote:> Anyone able to explain why "$fqdn" works and "$environment" doesn''t in: > > $extlookup_precedence=["%{fqdn}","%{environment}","common"] > > > How to reproduce it: > ----------------------------- > - In "/etc/puppet/manifests/site.pp" : > $extlookup_datadir = "/etc/puppet/manifests/extdata" > $extlookup_precedence=["%{fqdn}","%{environment}","common"] > > - In "/etc/puppet/manifests/extdata/common.csv" > extdata1,"CommonData1" > extdata2,"CommonData2" > > - In "/etc/puppet/manifests/extdata/production.csv" > extdata1,"ProdEnvData" > > - In "/etc/puppet/manifests/extdata/myhostname.domain.local.csv" > extdata2,"HostData" > > - In a manifest, test it with: > $extdata1 = extlookup(extdata1) > $extdata2 = extlookup(extdata2) > file{"/tmp/test.txt" : > ensure => file, > content => "FQDN = ${fqdn} , ENV = ${environment}, extdata1 > ${extdata1) , extdata2 = ${extdata2) ", > } > > - At the end, test.txt will contain : > FQDN = myhostname.domain.local , ENV = production, extdata1 = CommonData1 , > extdata2 = HostData > > - But I guess the expected result should be: > FQDN = myhostname.domain.local , ENV = production, extdata1 = ProdEnvData, > extdata2 = HostData > > What am I missing here ? > > 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 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. > >-- 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.
R.I.Pienaar
2011-Apr-22 10:22 UTC
Re: [Puppet Users] Puppet environment can''t be used in extlookup (precedence)
----- Original Message -----> This is bugging me for a couple of days now as I don''t seem to find a > reasonable explanation for the different behavior on the 2 puppet > variables. Not sure if it''s a puppet issue or an extlookup issue (or > maybe my own issue).your example looks fine, and it works for me on 2.6.6, not tried on newer -- 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.
Marcello de Sousa
2011-Apr-22 11:08 UTC
Re: [Puppet Users] Puppet environment can''t be used in extlookup (precedence)
Tested with 2.6.7-1 I''ll try to reproduce it with 2.6.6 On Fri, Apr 22, 2011 at 12:22 PM, R.I.Pienaar <rip@devco.net> wrote:> > > ----- Original Message ----- >> This is bugging me for a couple of days now as I don''t seem to find a >> reasonable explanation for the different behavior on the 2 puppet >> variables. Not sure if it''s a puppet issue or an extlookup issue (or >> maybe my own issue). > > your example looks fine, and it works for me on 2.6.6, not tried on newer > > -- > 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. > >-- 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.
Marcello de Sousa
2011-Sep-19 20:30 UTC
Re: [Puppet Users] Puppet environment can''t be used in extlookup (precedence)
It looks like this problem is related to the use of ENC and to the extremely-annoying-more-than-one-year-old #3910 bug :( I wonder what people are doing as a viable workaround. I know the Nokia guys solved it with a hack detecting the environment discrepancy it in their ENC but I don''t know the code. Any nice tips anyone ? On Fri, Apr 22, 2011 at 1:08 PM, Marcello de Sousa <lists@area151.com> wrote:> Tested with 2.6.7-1 > > I''ll try to reproduce it with 2.6.6 > > On Fri, Apr 22, 2011 at 12:22 PM, R.I.Pienaar <rip@devco.net> wrote: >> >> >> ----- Original Message ----- >>> This is bugging me for a couple of days now as I don''t seem to find a >>> reasonable explanation for the different behavior on the 2 puppet >>> variables. Not sure if it''s a puppet issue or an extlookup issue (or >>> maybe my own issue). >> >> your example looks fine, and it works for me on 2.6.6, not tried on newer >> >> -- >> 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. >> >> >-- 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.