Merge "Follow up on Ansible version checking"

This commit is contained in:
Zuul 2020-02-19 10:50:05 +00:00 committed by Gerrit Code Review
commit 990400c76e

View File

@ -5,7 +5,7 @@
function check_ansible_compatibility {
ANSIBLE_VERSION_MIN=2.8
ANSIBLE_VERSION_MAX=2.9
ANSIBLE_VERSION_HOST=$(ansible --version | head -n1 | egrep -o '[0-9]\.[0-9]+')
ANSIBLE_VERSION_HOST=$(ANSIBLE_DEBUG=0 ansible --version | head -n1 | egrep -o '[0-9]\.[0-9]+')
if [[ $(printf "%s\n" "$ANSIBLE_VERSION_MIN" "$ANSIBLE_VERSION_MAX" "$ANSIBLE_VERSION_HOST" | sort -V | head -n1) != "$ANSIBLE_VERSION_MIN" ]] ||
[[ $(printf "%s\n" "$ANSIBLE_VERSION_MIN" "$ANSIBLE_VERSION_MAX" "$ANSIBLE_VERSION_HOST" | sort -V | tail -1) != "$ANSIBLE_VERSION_MAX" ]]; then