On Tuesday, Ansible (now owned by Red Hat), released a new version of their open source configuration management solution: Ansible 2.0. This release was started in order to eliminate technical debt that had crept into the code, reorganize code to make everything easier to find, and to add several new features.
- Task Blocks introduce exception handling to Ansible playbooks, which simplifies their development. Blocks also users to use tags and conditional variables to group related tasks together.
- Playbook Parsing: The code for this feature was almost completely rewritten, and improves error identification as well as suggesting fixes.
- New Execution Strategy Plugins: Made possible only due to the refactoring of the project. According to Ansible:
“Execution strategies allow users to change the way in which Ansible runs tasks on targeted hosts. Classic Ansible takes a single task and runs it on all hosts before moving onto the next task (which we now call the “linear” strategy). Ansible 2.0 also includes the “free” strategy, which allows each host to process its list of tasks as quickly as possible (still in-order) without waiting for all other hosts. And since these are plugins (like so many other things in Ansible), users are free to come up with strategies of their own!”
- Over 200 new modules, including ways to manage OpenStack, improve support for AWS, configuring VMware environments, and a new Docker connection plugin.
However, there are some known issues with the new release that Ansible has already acknowledged. First, the plugin API has changed significantly, rendering some existing playbooks incompatible unless the user updates them. Second, Ansible 2.0 does not send an alert if a non-existent tag is specified. Third, “Due to the fact that include tasks are now evaluated at run time, Ansible no longer knows ahead of time about any tasks contained within files which have yet to be included.”