# facter -p box32.interfaces_ipv4.eth0.bootproto
static
#
--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/1a0698c9-b269-4381-aeae-ee4cd7c524e3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
<%= hostname[interfaces_ipv4][eth0][bootproto] %>
or even
<%= os[release][major] %>--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/1240c73e-755d-4fd2-9ea7-eb596409f046%40googlegroups.com.
<%= @hostname["interfaces_ipv4"]["eth0"]["bootproto"] %>Oct 12 13:04:06 box32 puppet-agent[37813]: Could not retrieve catalog from remote server: Error 400 on SERVER: Evaluation Error: Error while evaluating a Function Call, Failed to parse template network/ifcfg-ethX.erb:
Oct 12 13:04:06 box32 puppet-agent[37813]: Filepath: /etc/puppetlabs/code/environments/production/modules/network/templates/ifcfg-ethX.erb
Oct 12 13:04:06 box32 puppet-agent[37813]: Line: 4
Oct 12 13:04:06 box32 puppet-agent[37813]: Detail: undefined method `[]' for nil:NilClassHi Russel,I tried to use reference the variable as below, but got an error.
# facter --puppet box32.interfaces_ipv4.eth0.bootproto
static
## facter --puppet box32.interfaces_ipv4.eth0.bootproto
#Russel,I can see the hash on puppet master but not on agent. Can this be the reason ? Importantly, when I try to create a file for custom facts on agent, it gets deleted in the subsequent puppet run.