Skip to content

Commit

Permalink
Check if python netaddr and recent enough jinja are installed (kubern…
Browse files Browse the repository at this point in the history
…etes-sigs#7486)

CentOS 7 provides up to date Ansible with really old jinja version

Signed-off-by: Etienne Champetier <[email protected]>
  • Loading branch information
champtar authored Apr 13, 2021
1 parent e7ce830 commit 332cc1c
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions ansible_version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 332cc1c

Please sign in to comment.