Skip to content

Commit 06d48e8

Browse files
author
yingzhe.hu
committed
<fix>[sftpbackupstorage]: install nmap when deploy ns10
Resolves: ZSTAC-50057 Change-Id: I64756f696a6775716f6f7a6c767a717a656f6962
1 parent 5038fd3 commit 06d48e8

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

sftpbackupstorage/ansible/sftpbackupstorage.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,14 @@
8686
run_remote_command(command, host_post_info)
8787

8888
if distro in RPM_BASED_OS:
89+
install_pkgs = 'openssh-clients qemu-img'
90+
if releasever in ['ns10']:
91+
install_pkgs = "nmap {}".format(install_pkgs)
92+
8993
if zstack_repo != 'false':
9094
# name: install sftp backup storage related packages on RedHat based OS from local
91-
command = ("pkg_list=`rpm -q openssh-clients qemu-img | grep \"not installed\" | awk '{ print $2 }'` && for pkg"
92-
" in $pkg_list; do yum --disablerepo=* --enablerepo=%s install -y $pkg; done;") % (zstack_repo)
95+
command = ("pkg_list=`rpm -q %s | grep \"not installed\" | awk '{ print $2 }'` && for pkg"
96+
" in $pkg_list; do yum --disablerepo=* --enablerepo=%s install -y $pkg; done;") % (install_pkgs, zstack_repo)
9397
run_remote_command(command, host_post_info)
9498
else:
9599
# name: install sftp backup storage related packages on RedHat based OS from online

0 commit comments

Comments
 (0)