Testing the ansible version

Now that ansible 1.4.0 is out, I’d like to start making use of some of the new modules. But I’d like to make sure there are no surprises for people using my playbooks.

So is there a way inside a playbook either to check the version of ansible it is running under, or assert a minimum required version? Then the user can be informed in a helpful way that they need to update ansible, rather than just having it barf on an unknown module.

Thanks,

Brian.

Yeah, this has been a proposed feature but is not implemented yet.

Here’s the ticket if someone wants to add it before us: https://github.com/ansible/ansible/issues/4357