Playbooks now do Facter/Ohai-like things, improved syntax and capabilities

w00t! new features.

I have updated the playbook format. See examples/playbook.yml in git.

https://github.com/mpdehaan/ansible/blob/master/examples/playbook.yml

Variables obtained from the host system are now available in template usage and also in forming up commands themselves. If you are familiar with how Puppet and Chef do it, it’s exactly like that.

Furthermore, variables can be pushed down via a much easier playbook syntax, that I think blows both of those tools away. I borrowed heavily from Taboot, so major credit to Eck and Tim.

There are several things I think are pretty damn cool here.

How easy this was to add – 30 minutes from start to finish.

How much simpler the DSL is than in either Puppet or Chef

And how little code there is for everything still.

Next up, I’m going to let imports be parameterized, so that we have a way of doing “define” (in Puppet language) type parameterized things, just like this:

  • include: wordpress.yml blogname=foo
  • include: wordpress.yml blogname=bar

Here is the commit for the above https://github.com/mpdehaan/ansible/commit/8d57ceecf1d28c06b498512bf65155257dfd4e84

I also have a bug filed (#84) which should make tempting and setup operations as non-root “just work”. Non-root usage will continue to be a focus, so playbooks as non root are going to work without thinking about it.

–Michael