Fix ssh-salt calls with scan roster for uncached clients

When using salt-ssh with a scanning roster uncached minions
lead to a traceback indicating an error creating the Single()
object.

Fix this error by ensuring that the target dictionary always
contains a host key and the appropriate value.

Fixes #42588
This commit is contained in:
Andreas Thienemann 2017-07-27 16:40:35 +02:00 committed by rallytime
parent 7d385f8bdc
commit cd5eb93903

View file

@ -467,6 +467,8 @@ class SSH(object):
for default in self.defaults:
if default not in self.targets[host]:
self.targets[host][default] = self.defaults[default]
if 'host' not in self.targets[host]:
self.targets[host]['host'] = host
args = (
que,
self.opts,