diff --git a/doc/man/salt.7 b/doc/man/salt.7 index 939bf348c2..3ef02d6936 100644 --- a/doc/man/salt.7 +++ b/doc/man/salt.7 @@ -32582,8 +32582,8 @@ YAML contents: .ft C salt\-ssh: config_dir: path/to/config/dir - max_procs: 30 - wipe_ssh: True + ssh_max_procs: 30 + ssh_wipe: True .ft P .fi .UNINDENT @@ -32602,7 +32602,7 @@ The option keys specified must match the destination attributes for the options specified in the parser \fBsalt.utils.parsers.SaltSSHOptionParser\fP\&. For example, in the case of the \fB\-\-wipe\fP command line option, its \fBdest\fP is configured to -be \fBwipe_ssh\fP and thus this is what should be configured in the +be \fBssh_wipe\fP and thus this is what should be configured in the \fBSaltfile\fP\&. Using the names of flags for this option, being \fBwipe: True\fP or \fBw: True\fP, will not work. .UNINDENT diff --git a/doc/topics/ssh/index.rst b/doc/topics/ssh/index.rst index 81b9e7cfc5..87d03a6f87 100644 --- a/doc/topics/ssh/index.rst +++ b/doc/topics/ssh/index.rst @@ -189,8 +189,8 @@ YAML contents: salt-ssh: config_dir: path/to/config/dir - max_procs: 30 - wipe_ssh: True + ssh_max_procs: 30 + ssh_wipe: True Instead of having to call ``salt-ssh --config-dir=path/to/config/dir --max-procs=30 --wipe \* test.ping`` you @@ -204,7 +204,7 @@ Boolean-style options should be specified in their YAML representation. options specified in the parser :py:class:`salt.utils.parsers.SaltSSHOptionParser`. For example, in the case of the ``--wipe`` command line option, its ``dest`` is configured to - be ``wipe_ssh`` and thus this is what should be configured in the + be ``ssh_wipe`` and thus this is what should be configured in the ``Saltfile``. Using the names of flags for this option, being ``wipe: True`` or ``w: True``, will not work. diff --git a/salt/client/ssh/__init__.py b/salt/client/ssh/__init__.py index a4ce89af66..dca62f9705 100644 --- a/salt/client/ssh/__init__.py +++ b/salt/client/ssh/__init__.py @@ -277,7 +277,7 @@ class SSH(object): self.defaults['thin_dir'] = os.path.join( '/tmp', '.{0}'.format(uuid.uuid4().hex[:6])) - self.opts['wipe_ssh'] = 'True' + self.opts['ssh_wipe'] = 'True' self.serial = salt.payload.Serial(opts) self.returners = salt.loader.returners(self.opts, {}) self.fsclient = salt.fileclient.FSClient(self.opts) @@ -664,7 +664,14 @@ class Single(object): if kwargs.get('wipe'): self.wipe = 'False' else: - self.wipe = 'True' if self.opts.get('wipe_ssh') else 'False' + if self.opts.get('wipe_ssh'): + salt.utils.warn_until( + 'Nitrogen', + 'Support for \'wipe_ssh\' has been deprecated in Saltfile and will be removed ' + 'in Salt Nitrogen. Please use \'ssh_wipe\' instead.' + ) + self.wipe = 'True' + self.wipe = 'True' if self.opts.get('ssh_wipe') else 'False' if kwargs.get('thin_dir'): self.thin_dir = kwargs['thin_dir'] else: diff --git a/salt/utils/parsers.py b/salt/utils/parsers.py index e16d3c5d25..8131e0655a 100644 --- a/salt/utils/parsers.py +++ b/salt/utils/parsers.py @@ -2713,7 +2713,7 @@ class SaltSSHOptionParser(six.with_metaclass(OptionParserMeta, '-w', '--wipe', default=False, action='store_true', - dest='wipe_ssh', + dest='ssh_wipe', help='Remove the deployment of the salt files when done executing.', ) self.add_option(