Delete installer file first to empty the directory

This commit is contained in:
David Boucha 2013-11-21 11:26:19 -07:00
parent 70b9bf1384
commit 4a25ad7275

View File

@ -460,8 +460,13 @@ def deploy_windows(host, port=445, timeout=900, username='Administrator',
win_cmd('winexe {0} "c:\\salttemp\\{1} /S /master={2} /minion-name={3}"'.format( win_cmd('winexe {0} "c:\\salttemp\\{1} /S /master={2} /minion-name={3}"'.format(
creds, installer, master, name creds, installer, master, name
)) ))
# Shell out to smbclient to deltree C:\salttmp\ # Shell out to smbclient to delete C:\salttmp\ and installer file
## Unless keep_tmp is True ## Unless keep_tmp is True
if not keep_tmp:
win_cmd('smbclient {0}/c$ -c "del salttemp\\{1}; prompt; exit;"'.format(
creds,
installer,
))
if not keep_tmp: if not keep_tmp:
win_cmd('smbclient {0}/c$ -c "rmdir salttemp; prompt; exit;"'.format( win_cmd('smbclient {0}/c$ -c "rmdir salttemp; prompt; exit;"'.format(
creds, creds,