From 83a0be3afd9e54bb946c0e05f2f0390425eb64bf Mon Sep 17 00:00:00 2001 From: Angel Garza <70922156+AngelGarzaDev@users.noreply.github.com> Date: Sat, 24 Feb 2024 20:20:57 -0500 Subject: [PATCH] Added pre_task to verify minimum Ansible version (#454) --- site.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/site.yml b/site.yml index e57deab..4b0c104 100644 --- a/site.yml +++ b/site.yml @@ -1,4 +1,13 @@ --- +- name: Pre tasks + hosts: all + pre_tasks: + - name: Verify Ansible is version 2.11 or above. (If this fails you may need to update Ansible) + assert: + that: "ansible_version.full is version_compare('2.11', '>=')" + msg: > + "Ansible is out of date. See here for more info: https://docs.technotim.live/posts/ansible-automation/" + - name: Prepare Proxmox cluster hosts: proxmox gather_facts: true