Prefetch Technologies // Keeping your cache lines cozy

Installing and using facter on Solaris and Linux hosts

I have been playing around with puppet, which is an awesome configuration management tool. Puppet allows you to apply configurations to nodes based on one or more facts (a fact is a specific piece of information, such as a list of network interfaces), which includes everything from operating system information to the network configuration. To gather this information, puppet uses facter, which provides a consistent way to locate information about a machine in a machine independent way. To install facter, you can use your favorite package manager, or run the following to install from source:

$ tar xfvz facter-1.5.tgz
$ cd facter-1.5
$ ruby install.rb

Once facter is installed, you can use the facter program to list all of the available facts on your system:

$ facter | head -5
architecture => x86_64
domain => prefetch.net
facterversion => 1.5.4
fqdn => disarm.prefetch.net
hardwareisa => x86_64

To retrieve the value of a fact, you can run facter with the name of the facts you want to display:

$ facter hostname interfaces macaddress
hostname => kvmnode1 interfaces => macaddress => 54:52:00:53:20:00

I'm hoping to start writing about puppet, and my experiences using it to manage my lab. It's an addictive piece of software, and can save admins lots and lots of time!