Open robdennis opened 2 years ago
Hi there! Welcome to the Salt Community! Thank you for making your first contribution. We have a lengthy process for issues and PRs. Someone from the Core Team will follow up as soon as possible. In the meantime, here’s some information that may help as you continue your Salt journey. Please be sure to review our Code of Conduct. Also, check out some of our community resources including:
There are lots of ways to get involved in our community. Every month, there are around a dozen opportunities to meet with other contributors and the Salt Core team and collaborate in real time. The best way to keep track is by subscribing to the Salt Community Events Calendar. If you have additional questions, email us at saltproject@vmware.com. We’re glad you’ve joined our community and look forward to doing awesome things with you!
Description Using the
sshconfig
roster with salt-ssh will fail with a parse error if the sshconfig uses the "Include" directiveSetup
Steps to Reproduce the behavior
/etc/.ssh/config
:rest of the host blocks here
Traceback (most recent call last): File "/usr/bin/salt-ssh", line 11, in
load_entry_point('salt==3004.1', 'console_scripts', 'salt-ssh')()
File "/usr/lib/python3.6/site-packages/salt/scripts.py", line 459, in salt_ssh
client.run()
File "/usr/lib/python3.6/site-packages/salt/cli/ssh.py", line 21, in run
ssh = salt.client.ssh.SSH(self.config)
File "/usr/lib/python3.6/site-packages/salt/client/ssh/init.py", line 240, in init
self.targets = self.roster.targets(self.opts["tgt"], self.tgt_type)
File "/usr/lib/python3.6/site-packages/salt/roster/init.py", line 100, in targets
targets.update(self.rosters[f_str](tgt, tgt_type))
File "/usr/lib/python3.6/site-packages/salt/loader/lazy.py", line 149, in call
return self.loader.run(run_func, *args, kwargs)
File "/usr/lib/python3.6/site-packages/salt/loader/lazy.py", line 1201, in run
return self._last_context.run(self._run_as, _func_or_method, *args, *kwargs)
File "/usr/lib/python3.6/site-packages/contextvars/init.py", line 38, in run
return callable(args, kwargs)
File "/usr/lib/python3.6/site-packages/salt/loader/lazy.py", line 1216, in _run_as
return _func_or_method(*args, **kwargs)
File "/usr/lib/python3.6/site-packages/salt/roster/sshconfig.py", line 99, in targets
all_minions = parse_ssh_config([line.rstrip() for line in fp])
File "/usr/lib/python3.6/site-packages/salt/roster/sshconfig.py", line 56, in parse_ssh_config
hosts[-1].append(line)
IndexError: list index out of range