Require a minimum Ansible version in your Playbook
It's helpful to be able to enforce a minimum required Ansible version in Ansible playbooks. Ansible Roles have long been able to specify a minimum Ansible version—but only for Ansible Galaxy and ansible-galaxy
-related dependency management.
I've found more and more that users who installed Ansible further in the past (in the 1.7.x or 1.8.x era) are now using some of my newer projects that require Ansible 2.0 (there are so many nice new shiny things!), and they're running into errors like:
ERROR: [DEPRECATED]: include + with_items is a removed deprecated feature. Please update your playbooks.
Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.
The problem, as it turns out, is that these users are running a version < 2.0, but it's not very obvious based on that error message!