From eaf8c1fb39b6d0d722023eb532d13034833c1967 Mon Sep 17 00:00:00 2001 From: Etienne Champetier Date: Sat, 10 Apr 2021 12:00:37 -0400 Subject: [PATCH] Check if python netaddr and recent enough jinja are installed CentOS 7 provides up to date Ansible with really old jinja version Signed-off-by: Etienne Champetier --- ansible_version.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/ansible_version.yml b/ansible_version.yml index b4631223aad..268136df285 100644 --- a/ansible_version.yml +++ b/ansible_version.yml @@ -15,3 +15,18 @@ - 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' | ipaddr" + tags: + - check + + # CentOS 7 provides too old jinja version + - name: "Check that jinja is not too old (install via pip)" + assert: + msg: "Your Jinja version is too old, install via pip" + that: "{% set test %}It works{% endset %}{{ test == 'It works' }}" + tags: + - check