You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
589 B

  1. ---
  2. - hosts: localhost
  3. gather_facts: false
  4. become: no
  5. vars:
  6. minimal_ansible_version: 2.9.0
  7. maximal_ansible_version: 2.10.0
  8. ansible_connection: local
  9. tasks:
  10. - name: "Check {{ minimal_ansible_version }} <= Ansible version < {{ maximal_ansible_version }}"
  11. assert:
  12. msg: "Ansible must be between {{ minimal_ansible_version }} and {{ maximal_ansible_version }}"
  13. that:
  14. - ansible_version.string is version(minimal_ansible_version, ">=")
  15. - ansible_version.string is version(maximal_ansible_version, "<")
  16. tags:
  17. - check