2020-04-22 20:33:44 +00:00
|
|
|
---
|
|
|
|
- hosts: localhost
|
|
|
|
gather_facts: false
|
|
|
|
become: no
|
|
|
|
vars:
|
2021-01-11 15:49:11 +00:00
|
|
|
minimal_ansible_version: 2.9.0
|
|
|
|
maximal_ansible_version: 2.10.0
|
2020-04-22 20:33:44 +00:00
|
|
|
ansible_connection: local
|
|
|
|
tasks:
|
2021-01-11 15:49:11 +00:00
|
|
|
- name: "Check {{ minimal_ansible_version }} <= Ansible version < {{ maximal_ansible_version }}"
|
2020-04-22 20:33:44 +00:00
|
|
|
assert:
|
2021-01-11 15:49:11 +00:00
|
|
|
msg: "Ansible must be between {{ minimal_ansible_version }} and {{ maximal_ansible_version }}"
|
2020-04-22 20:33:44 +00:00
|
|
|
that:
|
|
|
|
- ansible_version.string is version(minimal_ansible_version, ">=")
|
2021-01-11 15:49:11 +00:00
|
|
|
- ansible_version.string is version(maximal_ansible_version, "<")
|
2020-04-22 20:33:44 +00:00
|
|
|
tags:
|
|
|
|
- check
|