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 =>
facterversion => 1.5.4
fqdn =>
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!

3 thoughts on “Installing and using facter on Solaris and Linux hosts”

  1. Considering I’m a fan of both puppet and your blog, it’s great to see you’re now writing about puppet, looking forward to reading more of your thoughts on this topic.

  2. Matt, I’d definitely be interested in hearing if you’re able to integrate puppet with Solaris systems.

  3. We have been using Puppet for about a year now on both Solaris x86 and SPARC servers. It’s truly great software.
    We use if to manage everything from printer configuration files, environment files to sudoers across 15 machines.

    I honestly saves me hours of work every month.

Leave a Reply

Your email address will not be published. Required fields are marked *