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 <li...@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+unsubscr...@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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to