Fix salt-ssh with saltutil.cmd and in orchestration

This commit is contained in:
jeanluc 2023-12-06 17:59:09 +01:00 committed by Daniel Wozniak
parent c1ea51b0a8
commit 46e7afa3ef
2 changed files with 5 additions and 0 deletions

1
changelog/65670.fixed.md Normal file
View file

@ -0,0 +1 @@
Fixed Salt-SSH pillar rendering and state rendering with nested SSH calls when called via saltutil.cmd or in an orchestration

View file

@ -39,6 +39,10 @@ class SSHClient:
# Salt API should never offer a custom roster!
self.opts["__disable_custom_roster"] = disable_custom_roster
# Pillar compilation and nested SSH calls require the correct config_dir
# in __opts__, otherwise we will use the SSH minion's one later.
if "config_dir" not in self.opts:
self.opts["config_dir"] = os.path.dirname(c_path)
def sanitize_kwargs(self, kwargs):
roster_vals = [