Skip to content

Commit 765442c

Browse files
author
gitlab
committed
Merge branch 'enable_x86_ns10' into 'master'
<fix>[sftpbackupstorage]: install nmap when deploy ns10 See merge request zstackio/zstack-utility!2269
2 parents ae68f63 + 06d48e8 commit 765442c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

sftpbackupstorage/ansible/sftpbackupstorage.py

+6-2
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)