« Previous -
Version 2/9
(diff) -
Next » -
Current version
R.I. Pienaar, 11/30/2010 06:00 pm
Facter Fact Source¶
Overview¶
The facter plugin enables mcollective to use facter as a source for facts about your system.
This plugin uses a 300 second cache for facts by default, after that it will reset facter and regenerate all the facts, this adds a second or so overhead to discovery.
This plugin is released as GPLv2 same as the license of facter.
Installation¶
- The source for the plugin is GitHub
- Follow the basic plugin install guide – place the facter.rb in the facts sub directory
Configuration¶
You can set the following config options in the server.cfg
- plugin.facter.facterlib – where to find custom facts, defaults to /var/lib/puppet/lib/facter:/var/lib/puppet/facts
- plugin.facter.cache_time – how long to cache for, defaults to 300
Usage¶
You should now be able to do use all your facter facts in discovery and fact reporting.
With this enabled and LSB on all your servers you could do a report of your operating systems like this:
$ mc-facts lsbdistdescription
Report for fact: lsbdistdescription
CentOS release 5.2 (Final) found 1 times
CentOS release 5.3 (Final) found 9 times
CentOS release 5.4 (Final) found 35 times
Finished processing 45 hosts in 5006.50 ms
You can use facts in other filters like:
% mc-find-hosts -W country=us host1.example.com host2.example.com host3.example.com
And so forth.