4 ms·
I have no idea how to begin to read that... How is this better than something like this: gen-hosts config-file > /etc/hosts ? See this gist I just made:
by snprbob86 15y ago
I have no idea how to begin to read that...
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 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.
- moe 15y agoWell, scripts like yours go a long a way. The problem is that at some point you'll want more integration and at that point you can either go with puppet/chef - or you'll end up re-inventing them.
- snprbob86 15y agoMore integration with what? What would I be reinventing? Again, I'm genuinely ignorant in this department. Really curious what I'm not understanding, but I just get the feeling that "worse is better" here.