Merge "Fix missing Ansible version in the error message" into stable/xena

This commit is contained in:
Zuul 2021-11-04 11:50:46 +00:00 committed by Gerrit Code Review
commit bf418984d0
2 changed files with 6 additions and 1 deletions

View File

@ -0,0 +1,5 @@
---
fixes:
- |
Fixes missing current Ansible version in the error message.
`LP#1948979 <https://launchpad.net/bugs/1948979>`__

View File

@ -60,7 +60,7 @@ function check_environment_coherence {
if [[ $(printf "%s\n" "$ANSIBLE_VERSION_MIN" "$ANSIBLE_VERSION_MAX" "$ansible_version" | sort -V | head -n1) != "$ANSIBLE_VERSION_MIN" ]] ||
[[ $(printf "%s\n" "$ANSIBLE_VERSION_MIN" "$ANSIBLE_VERSION_MAX" "$ansible_version" | sort -V | tail -n1) != "$ANSIBLE_VERSION_MAX" ]]; then
echo "ERROR: Ansible version should be between $ANSIBLE_VERSION_MIN and $ANSIBLE_VERSION_MAX. Current version is $ANSIBLE_VERSION_HOST which is not supported."
echo "ERROR: Ansible version should be between $ANSIBLE_VERSION_MIN and $ANSIBLE_VERSION_MAX. Current version is $ansible_full_version which is not supported."
exit 1
fi
}