MCPcopy Create free account
hub / github.com/saltstack/salt / SaltSSH

Class SaltSSH

salt/cli/ssh.py:7–22  ·  view source on GitHub ↗

Used to Execute the salt ssh routine

Source from the content-addressed store, hash-verified

5
6
7class SaltSSH(salt.utils.parsers.SaltSSHOptionParser):
8 """
9 Used to Execute the salt ssh routine
10 """
11
12 def run(self):
13 if "-H" in sys.argv or "--hosts" in sys.argv:
14 sys.argv += ["x", "x"] # Hack: pass a mandatory two options
15 # that won't be used anyways with -H or --hosts
16 self.parse_args()
17
18 ssh = salt.client.ssh.SSH(self.config)
19 try:
20 ssh.run()
21 finally:
22 ssh.fsclient.destroy()

Callers 1

Calls

no outgoing calls

Tested by 1