Ansible For the Win
- Tags: php, ansible,
- Written on: September 15, 2012
I have arrived at a winner. After deciding to embracing Vagrant to manage my development environments. I trialed both Chef and Puppet and found both frustrating.
After installing vagrant I used a bash provisioner and came up with a few scripts to setup a basic dev environment. I later moved on to trial the industry leaders chef and puppet.
I started with Puppet and arrived at the following:
Pros:
- DSL helps ruby beginners like me.
- Good tutorial series.
Cons:
- Ruby for modules.
- No guarantee on the order of executing. No way to easily run apt-get update before other recipes run.
- PHP cookbooks lack polish
- Needed run a daemon on server.
I later try Chef and found the following:
Pros:
- Data-bags great way to manage dev/live settings.
- Configuration run line by line always knew the order execution of recepies.
- PHP and Pear cookbook.
Cons:
- Ruby everywhere, too much.
- Documentation at the time not beginner friendly in my opinion.
- Needed run a daemon on server.
Ansible to the rescue:
I would later try a new entrant into the configuration management scene called Ansible though still developing and the API changing on each release I believe the features working already justify early adoption.
- Uses SSH an not custom crypto.
- Write modules in any language they only have to return json.
- Internal modules don’t aim for lowest common denominator for example separate packages for APT and Yum.
- Playbooks are written in YML execute in sequence.
- Fails early unlike both chef and puppet.
- No Daemon on production servers.
Like chef and puppet there are plugins for vagrant and both offer cascading variables to manage dev / live environments as it’s early days there are no PHP modules, but I was able to translate my CLI scripts to playbooks easily. I look forward to the projects future and version 1 release.
My effors are available though github.