Ansible is way better though, mainly due to:
* Idempotence
* Templating
* Being declarative (turing completeness in a language = more likely to be buggy)
Ansible is way better though, mainly due to:
* Idempotence
* Templating
* Being declarative (turing completeness in a language = more likely to be buggy)
Shell of course has templating -- but it's a little dangerous...:
template=teapot size=short build=stout \
cat <<eof > teapot.conf
I'm a $template - $size and $build. I live at $(hostname).
eof
[ed: m4 is a little like cpp (the c pre-prosessor) on steroids (or acid). To get a feel for how it relates to templating for config files etc, see eg:Just why not use a readily available template/macro language along with shell scripts, if you've decided to use shell scripts.
I suppose you could use jinja and bash -- but why pull in two full interpreters as a dependency?
Some good comments on both sides here:
http://www.quora.com/Python-Web-Frameworks/What-are-the-adva...
http://www.reddit.com/r/Python/comments/ktjm2/jinja2_or_mako...
Eg:
dpkg-query --show \
--showformat='${Package;6} ${Installed-Size;4}^L\n' \
m4 python2.7-minimal dash bash mksh ksh \|
sort -n -k2
dash 212
m4 382
mksh 878
ksh 3110
bash 3941
python 5456
(Not that you can avoid python-minmal on Debian - but in a chroot you might, etc).As for can and cannot do, consider this "feature" of m4:
$ cat <<eof|m4 -Dme=you -Dpredictable=surprise
me=predictable
eof
you=surprise
Again, I'm not suggesting m4+dash is a great idea vs ansible -- just clarifying a couple of things...* Because jinja2 is overall a better templating language.
* YAML (not turing complete) + templating = readable and clear (this is how ansible does it).
* Bash (turing complete) + templating = unreadable and messy.
"I want my configuration code to look as clear and readable as my C++" <-- not a great sales pitch :)
Puppet also means you have to babysit the client service and the puppet master, and if they go down, you have to get them back up again. I deal with this problem a lot and I wish I didn't have to.