Tests — Ansible Documentation
docs.ansible.com › ansible › 2To compare a version number, such as checking if the ansible_distribution_versionversion is greater than or equal to ‘12.04’, you can use the version_comparefilter. The version_comparefilter can also be used to evaluate the ansible_distribution_version: {{ansible_distribution_version|version_compare('12.04','>=')}}
Tests — Ansible Documentation
docs.ansible.com › ansible › latestDec 21, 2021 · To compare a version number, such as checking if the ansible_facts['distribution_version'] version is greater than or equal to ‘12.04’, you can use the version test. The version test can also be used to evaluate the ansible_facts['distribution_version']