So, looks like the latest facter has fqdn... cool. but for some reason templates can''t access it. I was defining $fqdn in my site.pp, but had to remove it after the last yum update, which brought in a new facter package. But now my templates can use fqdn. Why would this happen? --jason
Jason Dillon wrote:> So, looks like the latest facter has fqdn... cool. but for some > reason templates can''t access it. I was defining $fqdn in my > site.pp, but had to remove it after the last yum update, which > brought in a new facter package. But now my templates can use fqdn. > Why would this happen?I assume you mean "can''t use" here? If so, and you''ve verified that the fqdn variable works elsewhere in your configuration, then that would be a very nasty bug. Can you verify using a simple exec that fqdn is working normally? -- If I want your opinion, I''ll read your entrails. --Doug Shewfelt --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com
On Oct 24, 2006, at 12:50 PM, Luke Kanies wrote:> Jason Dillon wrote: >> So, looks like the latest facter has fqdn... cool. but for some >> reason templates can''t access it. I was defining $fqdn in my >> site.pp, but had to remove it after the last yum update, which >> brought in a new facter package. But now my templates can use fqdn. >> Why would this happen? > > I assume you mean "can''t use" here?Yes that is what I meant.> If so, and you''ve verified that the fqdn variable works elsewhere in > your configuration, then that would be a very nasty bug.If I define fqdn in my site.pp then I get errors about not being allowed to redefine fqdn. When I remove my def, then my templates which reference it complain about fqdn not being available.> Can you verify using a simple exec that fqdn is working normally?How? --jason
Jason Dillon wrote:> > If I define fqdn in my site.pp then I get errors about not being > allowed to redefine fqdn. When I remove my def, then my templates > which reference it complain about fqdn not being available.Puppet will not allow you to override a variable in the same scope in which the variable is defined; Puppet is defining fqdn in the top scope, so it won''t allow you to redefine it in the same scope.>> Can you verify using a simple exec that fqdn is working normally? > > How?I keep a "test.pp" file around in my ~/bin directory, and I''d put something like this in there: exec { "/bin/echo $fqdn": } Then run that with "puppet ~/bin/test.pp". -- Freedom of speech in Usenet means that when you shout ''Fire!'' in a crowded theatre, half the crowd stands up and shouts, ''Wrong theatre!'' --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com