You need your custom fact script in:
<module>/lib/facter/<script>


On 29/06/2012, at 7:37, "llow...@oreillyauto.com" <llow...@oreillyauto.com> 
wrote:

> 
> 
> On Thursday, June 28, 2012 2:04:09 PM UTC-5, R.I. Pienaar wrote:
> 
> 
> ----- Original Message ----- 
> 
> I would make facts on the nodes for these.  Let say $role and $subrole 
> and then just use those in your hierarchy with %{role} and %{subrole} 
> thus allowing you to set variable for all those machines there. 
> 
> That's simple enough, and the docs [1] for creating a custom fact are mostly 
> straightforward.
> 
> The one thing I am unclear on, in the "plugins in modules" [2] document, it 
> says that if you are going to put your custom stuff in a module (such as in 
> their example, named 'custom') it says to follow the standard layout, and 
> that you have to have a manifests/init.pp.
> 
You need your custom fact script in:
<module>/lib/facter/<script>
> If all that is actually in the thing is lib/facter/myfact.rb, what do I put 
> in the manifests/init.pp ? Is it enough for it to exist but be empty?
> 
You would normally put your module definitions in init.pp but you should have 
the following as a minimum:
class <module name> {
}

> The document was somewhat unclear on this, or I missed it when reading. 
> 
> [1] http://docs.puppetlabs.com/guides/custom_facts.html
> [2] http://docs.puppetlabs.com/guides/plugins_in_modules.html
> -- 
> 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/-/NKCt1qaRwiEJ.
> 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.

-- 
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.

Reply via email to