Earlier quoted context omitted.
Curiosity, not to be argumentative: What are some examples of things are really elegant to express in Puppet? What are some examples of things that you had to resort to terrible hacks for? Please use personal, concrete examples, if you don't mind. I've only got a couple of boxes to manage, but reading through the docs for the big three configuration management systems, I really was confused about the need for most of…
Well, it's of course all subjective, but I can present my perception of both (elegance vs hack) in a single pastie: http://pastie.org/2668110 This will assemble a hosts-file that contains all hosts from $group, on the hosts that include the class. It's awesome and terrible at the same time because it demonstrates an Exported Resource (@@host, Host >, awesome) and at the same time it shows how we had to resort to extd…
How is this better than something like this:
gen-hosts config-file > /etc/hosts
?See this gist I just made: https://gist.github.com/1274379
That script is (1) more understandable to a programmer, (2) unambiguous with respect to output, (3) idempotent, (4) super extensible.
I suspect your Puppet script is doing some other stuff, but I can't begin to mentally parse it...
EDIT: Just wanted to point out that I didn't try to make that script either correct or identical to your script. Just wanted to give an impression of the flow of things.