Having an odd issue with the facts inside an ERB template.  I'm using the 
facts to build a somewhat dynamic MOTD.  I made some changes to init.pp for 
the module and deployed to my Dev environment and it started breaking 
things.  It started off with not being able to find a value for 
lsbdistdescription

Could not retrieve catalog from remote server: Error 400 on SERVER: Failed 
to parse template motd/motd.erb: Filepath: 
/usr/lib/ruby/site_ruby/1.8/puppet/parser/templatewrapper.rb Line: 81 
Detail: Could not find value for 'lsbdistdescription' at 
/etc/puppet/environments/development/modules/motd/templates/motd.erb:10 at 
/etc/puppet/environments/development/modules/motd/manifests/init.pp:44 on 
node cbe01d.example.com

Looking into the issue the only thing I found was that facts should now 
have an @ sign in front of them. Changing that didn't help.  I have 
reverted back to the old code and its still broken.  Oddly enough, it works 
as expected when I go to the server and run $ sudo puppet agent -t.  It 
applies the lsbdistdescription to MOTD, then the puppet daemon fires off 
after 30minutes and does not acknowledge lsbdistdescription.

Here is the current template:
+++++++++++++++++: System Data :+++++++++++++++++++
+ Hostname = <%= hostname %>
+ Domain = <%= domain %>
+ Address = <%= ipaddress_eth0 %>
+ OS: <%= @lsbdistdescription %> <%= architecture %> 
+ Kernel = <%= kernelrelease %>
+ Uptime = <%= uptime %>
+ CPU = <%= processorcount %>x  <%= processor0 %>
+ Total Memory = <%= memorysize %>
+ Managed by Puppet version <%= puppetversion %>
<% if @extra -%>
+ Extra Info = <%= @extra %>
<% end -%>
+++++++++++++++++++++++++++++++++++++++++++++++++++

Any ideas why only manual runs work as expected?

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/745beae5-fc41-45e2-b151-7930fe40bd28%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to