Your usage here is backwards. You need to re-read how puppet works. The node collects its facts and submits them to the puppet master. The puppet master uses the facts to compile a catalog for the node, which will be run by the node.
So you can set $foot in the fact, and echo it in the class, but not vice versa as you have done below. On Sep 25, 2012, at 5:28 AM, Frank wrote: > I've created a class where I define some variables like $mydns, $myproxy, etc > to use everywhere (in other manifests) > > The question is: Can I call these class variables inside a fact definition? > > Something like: > > #somemanifest.pp > class x { > $foo = "great" > } > > #somefact.rb > > Facter.add("foo") do > setcode do > Facter::Util::Resolution.exec('echo ${x::foo}') > end > end > > > > Thanks in advance > > -- > Frank > > > -- > 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. -- Jo Rhett Net Consonance : net philanthropy to improve open source and internet projects. -- 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.