From 1e54e400d4dd17fc4d30be3ee1b6141a7cacac63 Mon Sep 17 00:00:00 2001 From: jeanluc Date: Tue, 8 Nov 2022 04:30:11 +0100 Subject: [PATCH] Make salt-ssh respect --wipe again --- changelog/61083.fixed | 1 + salt/client/ssh/__init__.py | 7 +++++++ 2 files changed, 8 insertions(+) create mode 100644 changelog/61083.fixed diff --git a/changelog/61083.fixed b/changelog/61083.fixed new file mode 100644 index 00000000000..2d78d777bd7 --- /dev/null +++ b/changelog/61083.fixed @@ -0,0 +1 @@ +Made salt-ssh respect --wipe again diff --git a/salt/client/ssh/__init__.py b/salt/client/ssh/__init__.py index 0bba93421dd..81e5b580bbe 100644 --- a/salt/client/ssh/__init__.py +++ b/salt/client/ssh/__init__.py @@ -1205,6 +1205,13 @@ class Single: opts["grains"][grain] = self.target["grains"][grain] opts["pillar"] = data.get("pillar") + + # Restore --wipe. Note: Since it is also a CLI option, it should not + # be read from cache, hence it is restored here. This is currently only + # of semantic distinction since data_cache has been disabled, so refresh + # above always evaluates to True. TODO: cleanup? + opts["ssh_wipe"] = self.opts.get("ssh_wipe", False) + wrapper = salt.client.ssh.wrapper.FunctionWrapper( opts, self.id,