We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 0f4c337 + 34366a1 commit 327b1ccCopy full SHA for 327b1cc
1 file changed
conf/tools/install.sh
@@ -94,13 +94,8 @@ elif [ $tool = 'zstack-ctl' ]; then
94
elif [ $tool = 'zstack-sys' ]; then
95
SYS_VIRENV_PATH=/var/lib/zstack/virtualenv/zstacksys
96
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
+ # RE_INSTALL
+ if [ ! -x "$SYS_VIRENV_PATH/bin/ansible" ] || ! "$SYS_VIRENV_PATH/bin/ansible" --version 2>/dev/null | grep -q 'core 2.16.14'; then
104
rm -rf $SYS_VIRENV_PATH && python3.11 -m venv $SYS_VIRENV_PATH || exit 1
105
. $SYS_VIRENV_PATH/bin/activate
106
cd $cwd
0 commit comments