Merge pull request #11638 from bcoca/fix_delegate_to_badtype
capture error when smoeone puts a list or some other complex type in
This commit is contained in:
commit
8b644af1d8
1 changed files with 3 additions and 0 deletions
|
@ -407,6 +407,9 @@ class Runner(object):
|
||||||
# the hostname was not found in the inventory, so
|
# the hostname was not found in the inventory, so
|
||||||
# we just ignore this and try the next method
|
# we just ignore this and try the next method
|
||||||
pass
|
pass
|
||||||
|
except TypeError, e:
|
||||||
|
# Someone is trying to pass a list or some other 'non string' as a host.
|
||||||
|
raise errors.AnsibleError("Invalid type for delegate_to: %s" % str(e))
|
||||||
|
|
||||||
if thisuser is None and self.remote_user:
|
if thisuser is None and self.remote_user:
|
||||||
# user defined by play/runner
|
# user defined by play/runner
|
||||||
|
|
Loading…
Reference in a new issue