Thanks to my trying out Puppet, I learned about Augeas yesterday. It is a serious configuration management system. It pays to try new things out!
Augeas appears to use the concept of “lenses” to see into different configuration types. I get the feeling that “lenses” could also be described as very specific parsers. Doesn’t matter though, what they do is very cool!
For example, I used the augtool command line interface to load my /etc/hosts file. In doing so, augtool parsed the file into an object tree with nodes and values. This was very appropriate as only recently I was working on the host names portion of YoDNSConf when I think I finally figured out the relationship between hostnames and DNS. In augtool, when I printed the /etc/hosts configuration tree, it displays three nodes: ipaddr, canonical, and alias. Sweet, that’s good enough confirmation that my understanding of the /etc/hosts file is correct.
Please correct me if I’m wrong, but the first entry in the line for an ip is the canonical name, and the ones following are aliases. This was important to me as I wanted to also generate PTR records for unbound local-data from the same database. In the end, it all worked out.
But back to Augeas, the only issue I have with it at the moment is that its lacking PHP bindings at this time. It does have Ruby and Python bindings though, and since Puppet is written in Ruby and I’m still interested in learning more about Ruby, it might be a good thing. Like I said, it often pays off when I try new things.