Back in October, Red Hat acquired AnsibleWorks, making it the first major software company to buy out one of the four burgeoning players in the provisioning market. Today, Ansible released the first fruits of that acquisition in Ansible 2.0.

Chief among the changes in 2.0, said James Cammarata, head of the Ansible open-source project, was a good going over of the codebase. “Ansible had grown so fast and large over time that effort some technical debt had accumulated,” he said. “We took time and to take care of the parts of our code that were starting to get difficult to add features to.”

As a result, major changes were also possible with this release. Cammarata said that Ansible 2.0 introduces Blocks, a new section for developers’ Playbooks. While Playbooks list out the procedures and steps necessary to install everything desired on a target machine, they were previously unable to handle exceptions gracefully.

Now, however, using Blocks, developers can write instructions that only trigger when an installation fails. Thus, when an exception is thrown, an Ansible Playbook can now include a backup plan.

The other major change to Playbooks is that they are no longer pre-processed. This enables some new use cases and makes life easier for developers, as they can now reuse code more efficiently. This is enabled through the increased amount of execution strategies.

“The way Ansible has worked, if you have 100 hosts and 10 tasks, as you execute the first task in the list, it would wait for all 100 hosts in the list to execute before moving onto the second task,” said Cammarata. “Now, with additional execution strategies, each host will run through its task list as quickly as possible, without waiting for the others to finish that task first. If you’re adding one new host to your environment, you don’t have to wait for all the other hosts.”

This also means that Playbooks can now include operations that require a knowledge of the clusters’ hardware inventory. Previously, it was not possible to perform tasks that were dependent upon the state of the cluster being installed.

The future
The Ansible project is now focusing on a few of its road-map items for the next release. The most forthcoming release should elevate Microsoft Windows to a first-class citizen. After that, the team plans to work on its VMware integrations.