Changes between Version 3 and Version 4 of FacterTweaks


Ignore:
Timestamp:
Mar 14, 2011 4:57:46 PM (14 years ago)
Author:
plazonic
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • FacterTweaks

    v3 v4  
    11= Facter Tweaks =
    22
     3== New facts testing ==
     4While you are writing new facts please refer to [http://docs.puppetlabs.com/guides/custom_facts.html puppetlabs documentation].  In short do something like:
     5{{{
     6$ mkdir -p ~/lib/ruby/facter ; export RUBYLIB=~/lib/ruby
     7$ cp /path/to/hardware_platform.rb $RUBYLIB/facter
     8$ facter hardware_platform
     9SUNW,Sun-Blade-1500
     10}}}
     11
     12== New facts distributing ==
     13To distribute your new facts to puppet clients make a module (preferably the one where you are using this fact, e.g.
     14{{{
     15$ mkdir -p /etc/puppet/modules/myfirst_module/lib/facter
     16cp myfirstfact.rb /etc/puppet/modules/myfirst_module/lib/facter
     17}}}
     18
     19If you are distributing facts this way you can test them on the client by setting FACTERLIB environment variable:
     20{{{
     21export FACTERLIB=/var/lib/puppet/lib/facter
     22facter
     23}}}
    324== videocard fact ==
    425