Small Mosaic


Categories:

/books
/career
/codinghorrors
/events
/geekstuff
/justdont
/languages
/languages/bash
/linkshot
/magazines
/meta
/misctech
/movies
/nottech
/operatingsystems
/operatingsystems/linux
/operatingsystems/linux/debian
/operatingsystems/solaris
/perl
/presentations
/programming
/python
/ruby
/security
/security/apache
/security/tools
/serversmells
/services
/services/dns
/sites
/specifications
/sysadmin
/testing
/tools
/tools/commandline
/tools/firefox
/tools/gui
/tools/network
/tools/online
/tools/online/greasemonkey
/tools/puppet
/unixdaemon

Archives:

July 20101
June 20104
May 20102
April 20101
March 20108
February 20101
January 20102
October 20092
September 200910
August 200910
July 20094
June 20091
April 20093
March 20097
February 20094
January 200917
Full Archives

Wed, 14 Mar 2007

Playing with Facter
I'm on-call tonight so I invested some time in facter, "A cross-platform Ruby library for retrieving facts from operating systems." While facter is an interesting command line program (its extension mechanism is quite nice) its main claim to fame is that it's used by puppet (which I'm slowly evaluating as a CFEngine replacement) to determine facts about a machine.

While the docs are a little light on the ground the tgz contains a couple of examples and after some playing around I think I've got a basic Linux Bonding fact ready. For your viewing pleasure, the Facter Linux Network Bonding custom fact. It's not amazingly powerful or complex but it does seem to do what I want and it gave me a reason to look around the Ruby Dir class so it's not all bad. I've mostly put it up to show how easy it is for someone with very little ruby knowledge to extend facter.

Note: I also discovered that you can't do a confine :bonding => :true, facter works on literal string values, not on true or false.

Like this post? - Digg Me! | Add to del.icio.us! | reddit this!

Posted: 2007/03/14 23:20 | /ruby | Permanent link to this entry | This entry and same date


books career codinghorrors events geekstuff justdont magazines meta misctech movies nottech operatingsystems/linux operatingsystems/linux/debian operatingsystems/solaris perl presentations programming python ruby security security/apache security/tools serversmells services/dns sites sysadmin testing tools/commandline tools/firefox tools/gui tools/network tools/online tools/online/greasemonkey tools/puppet unixdaemon

Copyright © 2000-2010 Dean Wilson XML feed logo