mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
Merge branch '2014.7' into send_ext_mods
Conflicts: salt/client/ssh/__init__.py
This commit is contained in:
commit
c4924f727b
@ -727,13 +727,15 @@ OPTIONS.checksum = '{3}'
|
||||
OPTIONS.hashfunc = '{4}'
|
||||
OPTIONS.version = '{5}'
|
||||
OPTIONS.ext_mods = '{6}'
|
||||
ARGS = {7}\n'''.format(self.minion_config,
|
||||
OPTIONS.wipe = {7}
|
||||
ARGS = {8}\n'''.format(self.minion_config,
|
||||
RSTR,
|
||||
self.thin_dir,
|
||||
thin_sum,
|
||||
'sha1',
|
||||
salt.__version__,
|
||||
self.mods.get('version'),
|
||||
'True' if self.opts.get('wipe_ssh') else 'False',
|
||||
self.argv)
|
||||
py_code = SSH_PY_SHIM.replace('#%%OPTS', arg_str)
|
||||
py_code_enc = py_code.encode('base64').replace('\n', '_')
|
||||
|
@ -175,7 +175,12 @@ def main(argv):
|
||||
sys.stdout.flush()
|
||||
sys.stderr.write(OPTIONS.delimiter + '\n')
|
||||
sys.stderr.flush()
|
||||
os.execv(sys.executable, salt_argv)
|
||||
if OPTIONS.wipe:
|
||||
import subprocess
|
||||
subprocess.call(salt_argv)
|
||||
shutil.rmtree(OPTIONS.saltdir)
|
||||
else:
|
||||
os.execv(sys.executable, salt_argv)
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.exit(main(sys.argv))
|
||||
|
@ -2190,6 +2190,13 @@ class SaltSSHOptionParser(OptionParser, ConfigDirMixIn, MergeConfigMixIn,
|
||||
help=('Return the data from minions as a group after they '
|
||||
'all return.')
|
||||
)
|
||||
self.add_option(
|
||||
'-w', '--wipe',
|
||||
default=False,
|
||||
action='store_true',
|
||||
dest='wipe_ssh',
|
||||
help='Remove the deployment of the salt files when done executing.',
|
||||
)
|
||||
|
||||
auth_group = optparse.OptionGroup(
|
||||
self, 'Authentication Options',
|
||||
|
Loading…
Reference in New Issue
Block a user