Today at PuppetConf 2014 was another class day. We got in to some really interesting stuff, and by interesting I mean your eyes are about to glaze over if you’re not channeling your inner (or outer) nerd.
Custom facts. I’ve actually worked with these before, but filling in the blanks was nice. Just remember that Ruby returns the value of the last statement evaluated if you don’t have an explicit return in there. That’s also known the reason why I wasted hours and learned how to debug Puppet modules when I implemented my first custom fact.
Hiera. Learn it and use it. Especially since classes can pull their defaults from it. My next thing is to explore using MySQL as a data source instead of yaml. But either way, get that data out of your modules and into hiera. I’ve got a bit of that to do in my lab environment at home.
File manipulation. Man, this is where the fun starts, not that custom facts and hiera aren’t fun, but really, if you want to do something that makes actual, real, useful changes on your systems, this is it. Between file_line, concatenating fragments to build files, and managing config files with Augeas, you’re pretty well covered for all of your file manipulation needs. I’m going to be experimenting with using Augeas to build DNS zone files for my home lab environment really soon now. I’m starting to think that it could be used for internal DNS in a datacenter environment. It’ll be a lot easier than the manual processes that I see in use currently.
Tomorrow is our last day of class, and then the conference starts. I’ve got a certification exam scheduled for later in the week, and while I was feeling pretty good about my chances, I think this class has definitely helped out. We’ll see once I actually get to take it.