Skip to content

Commit 327b1cc

Browse files
committed
Merge branch 'fix/ZSTAC-82619' into '5.5.12'
<fix>[conf]: use absolute path for ansible version check during upgrade See merge request zstackio/zstack!9356
2 parents 0f4c337 + 34366a1 commit 327b1cc

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

conf/tools/install.sh

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,8 @@ elif [ $tool = 'zstack-ctl' ]; then
9494
elif [ $tool = 'zstack-sys' ]; then
9595
SYS_VIRENV_PATH=/var/lib/zstack/virtualenv/zstacksys
9696
ensure_python3_venv "$SYS_VIRENV_PATH"
97-
RE_INSTALL=false
98-
. $SYS_VIRENV_PATH/bin/activate
99-
if ! ansible --version | grep -q 'core 2.16.14'; then
100-
deactivate
101-
RE_INSTALL=true
102-
fi
103-
if $RE_INSTALL; then
97+
# RE_INSTALL
98+
if [ ! -x "$SYS_VIRENV_PATH/bin/ansible" ] || ! "$SYS_VIRENV_PATH/bin/ansible" --version 2>/dev/null | grep -q 'core 2.16.14'; then
10499
rm -rf $SYS_VIRENV_PATH && python3.11 -m venv $SYS_VIRENV_PATH || exit 1
105100
. $SYS_VIRENV_PATH/bin/activate
106101
cd $cwd

0 commit comments

Comments
 (0)