Files
kubespray/playbooks/ansible_version.yml
Wren Turkal 07960e8bb6 fix: Jinja version test warning (#13322)
The jinja version test conditional uses jinja in the condition, which is
deprecated. I have removed the assertion since ansible 2.18 has a dependency
on jinja2>=3.0.0.
2026-06-23 09:38:37 +00:00

27 lines
876 B
YAML

---
- name: Check Ansible version
hosts: all
gather_facts: false
become: false
run_once: true
vars:
minimal_ansible_version: 2.18.0
maximal_ansible_version: 2.19.0
tags: always
tasks:
- name: "Check {{ minimal_ansible_version }} <= Ansible version < {{ maximal_ansible_version }}"
assert:
msg: "Ansible must be between {{ minimal_ansible_version }} and {{ maximal_ansible_version }} exclusive - you have {{ ansible_version.string }}"
that:
- ansible_version.string is version(minimal_ansible_version, ">=")
- ansible_version.string is version(maximal_ansible_version, "<")
tags:
- check
- name: "Check that python netaddr is installed"
assert:
msg: "Python netaddr is not present"
that: "'127.0.0.1' | ansible.utils.ipaddr == '127.0.0.1'"
tags:
- check