HI guys!
I’m using that snippet to see if the local ansible is in the allowed range of versions (some time ago ansible has been updated to 2.3 without our knowledge and because of that our prod deployment failed)
> tasks:
> - name: Check for Ansible version
> assert:
> that:
> - "ansible_version.full in ansible_supported_versions"
> msg: 'Ansible version {{ ansible_version.full }} is not supported! It needs to be one of [{{ ansible_supported_versions | join(", ") }}]!'
> run_once: true
> when: check_ansible_version | bool
And in group_vars:
> check_ansible_version: true
> ansible_supported_versions:
> - 2.2.3.0
> - 2.2.2.0
> - 2.2.1.0
Best,
Karol
> --
> You received this message because you are subscribed to the Google Groups "Ansible Development" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
ansible-deve...@googlegroups.com.
> For more options, visit
https://groups.google.com/d/optout.