Ansible 2.0 Generally Available Shortly After Red Hat Acquisition

by Guillermo Beltri on Jan 29, 2016 |

Ansible Inc. has recently released version 2 of their configuration management platform. Ansible uses a YAML based format called Playbooks to express configuration, deployment and orchestration. Ansible v2.0, which is now generally available, focusses primarily on refactoring while trying to maintain backwards compatibility with existing playbooks. Major improvements include handling exceptions in blocks, bringing new strategies when executing different tasks or improving connection with other services through modules.

Starting with this version, users can define blocks inside their playbooks. Task blocks allow exception handling in the same way as many programming languages do (i.e. Phython with its try/except/finally structure). Group and manage related tasks is also possible through different attributes like tags or conditionals.

This release also includes a new way to control play execution. Three playbook strategies defined by Ansible allow users to configure the way in which different tasks are executed on targeted hosts. Default existing scripts follow a “linear strategy”, where a single task run on all hosts before moving onto the next task. “Free strategy” allows each host to run until the end of the playbook as fast as it can without waiting for all other hosts while “serial strategy“ ensures that a group of hosts finishes its tasks before another group can begin. Additionally users can come up with strategies of their own as plugins.

Over 200 new modules came up with this release, improving and expanding support for existing platforms such as Amazon Web Services, VMWare, Microsoft Windows or Docker. A complete new set of modules makes it easier to manage OpenStack and a new Docker plugin appeared with this release.

Changes in the plugin API force developers to check their plugins when updating to v.2.0. New dynamic includes in playbooks might generate some problems as well. James Cammarata, senior principal software engineer at Ansible, shared his opinion with InfoQ regarding these compatibility issues.

I do not think many users will be impacted by the API changes, and porting plugins to use the newer API is pretty easy. The difficulty comes in writing plugins that work seamlessly on both versions of the API, which is something we may address in the future if there is a need for it.
We’re currently looking at a solution for the problems introduced by making includes dynamic, which will most likely be included in 2.1 (though we reserve the right to introduce it earlier if we feel it’s appropriate).

Red Hat acquired Ansible Inc. in October last year, just a few days after the beta release of v2.0. InfoQ asked Cammarata about the influence that Red Hat had on this new release.

Red Hat did not have any input on 2.0. As you noted we had been working on it for some time prior to the deal closing and we released it when we felt it was ready.

Rate this Article


Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

General Feedback
Marketing and all content copyright © 2006-2016 C4Media Inc. hosted at Contegix, the best ISP we've ever worked with.
Privacy policy

We notice you're using an ad blocker

We understand why you use ad blockers. However to keep InfoQ free we need your support. InfoQ will not provide your data to third parties without individual opt-in consent. We only work with advertisers relevant to our readers. Please consider whitelisting us.