c12s-kubespray/ansible_version.yml

18 lines
589 B
YAML
Raw Normal View History

---
- hosts: localhost
gather_facts: false
become: no
vars:
minimal_ansible_version: 2.9.0
maximal_ansible_version: 2.10.0
ansible_connection: local
tasks:
- name: "Check {{ minimal_ansible_version }} <= Ansible version < {{ maximal_ansible_version }}"
assert:
msg: "Ansible must be between {{ minimal_ansible_version }} and {{ maximal_ansible_version }}"
that:
- ansible_version.string is version(minimal_ansible_version, ">=")
- ansible_version.string is version(maximal_ansible_version, "<")
tags:
- check