Hi,
Please could someone take a look at the below code and tell me where it is
failing ?
Facter.add(''syslocation'') do
#confine :kernel => "Linux"
setcode do
name = Facter.value(''hostname'')
case name
when /^e(t|d|u|s|p|q)(p|v)(sol|lin)\d+/
"E DC"
when /^b(t|d|u|s|p|q)(p|v)(sol|lin)\d+/
"F DC"
when /^a(t|d|u|s|p|q)(p|v)(sol|lin)\d+/
"G DC"
when /^vx*\d+/
"A DC"
when /^vm*\d+/
"V DC"
when /^adl*\d+/
"H DC"
else
#"RFF DC"
name
end
end
Could not find value for ''syslocation'' at
13:/etc/puppet/modules/rpd_snmp/templates/snmpd.conf.erb at
/etc/puppet/modules/rpd_snmp/manifests/init.pp:21
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/puppet-users/-/qq_iqOna9UUJ.
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.
have now found the solution so not to worry thanks. problem was that a extra "end" was missing On Monday, August 13, 2012 2:01:07 PM UTC+10, karl wrote:> > Hi, > > Please could someone take a look at the below code and tell me where it is > failing ? > > Facter.add(''syslocation'') do > #confine :kernel => "Linux" > setcode do > name = Facter.value(''hostname'') > case name > when /^e(t|d|u|s|p|q)(p|v)(sol|lin)\d+/ > "E DC" > when /^b(t|d|u|s|p|q)(p|v)(sol|lin)\d+/ > "F DC" > when /^a(t|d|u|s|p|q)(p|v)(sol|lin)\d+/ > "G DC" > when /^vx*\d+/ > "A DC" > when /^vm*\d+/ > "V DC" > when /^adl*\d+/ > "H DC" > else > #"RFF DC" > name > end > end > > Could not find value for ''syslocation'' at > 13:/etc/puppet/modules/rpd_snmp/templates/snmpd.conf.erb at > /etc/puppet/modules/rpd_snmp/manifests/init.pp:21 >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/vI7fzNZ1JxEJ. 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.