From 569560a290caddc45e048e0f5d5e66a08301f28e Mon Sep 17 00:00:00 2001 From: Jan Orel Date: Mon, 2 Sep 2024 17:47:02 +0200 Subject: [PATCH] M #-: Only skip Ansible installation in 6.10+ --- minione | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/minione b/minione index 9b011e6..f057eb9 100755 --- a/minione +++ b/minione @@ -1135,14 +1135,17 @@ fi check "type -t docker >/dev/null" "Checking docker is installed" 1 \ "SKIP will try to install" || INSTALL_DOCKER=true -# Install newer then system ansible using PIP for some distros -if [[ "${DISTNAME}${DISTVER}" =~ Ubuntu2204|Debian10 ]]; then +# Install newer then system ansible using PIP for some distros or for <=6.8 +if [[ "${DISTNAME}${DISTVER}" =~ Ubuntu2204|Debian10 ]] || verlte "$VERSION" 6.8; then check "type -t $PIP >/dev/null" "Checking ${PYTHON_PIP} is installed" 1 \ "SKIP will try to install" || MISSING_PKGS="${MISSING_PKGS} ${PYTHON_PIP}" - - ANSIBLE_VERSION=$(ansible --version | head -1 | tr -cd '[:digit:]' | cut -c 1-3) - check "[ $ANSIBLE_VERSION -ge 215 ]" "Checking ansible version (2.15+)" 1 \ - "SKIP will try to install" || MISSING_PIP_PKGS="'ansible==8.7.0'" + if type -t ansible >/dev/null; then + ANSIBLE_VERSION=$(ansible --version | head -1 | tr -cd '[:digit:]' | cut -c 1-3) + check "[ $ANSIBLE_VERSION -ge 215 ]" "Checking ansible version (2.15+)" 1 \ + "SKIP will try to install" || MISSING_PIP_PKGS="'ansible==8.7.0'" + else + check "false" "Checking ansible" 1 "SKIP will try to install" || MISSING_PIP_PKGS="'ansible==8.7.0'" + fi fi if type -t terraform >/dev/null; then