Merge pull request #486 from skvidal/devel
make Runner options conflict errors raise AnsibleErrors not traceback in...
This commit is contained in:
commit
72760dd51f
1 changed files with 4 additions and 2 deletions
|
@ -185,9 +185,11 @@ class Runner(object):
|
|||
|
||||
euid = pwd.getpwuid(os.geteuid())[0]
|
||||
if self.transport == 'local' and self.remote_user != euid:
|
||||
raise Exception("User mismatch: expected %s, but is %s" % (self.remote_user, euid))
|
||||
raise errors.AnsibleError("User mismatch: expected %s, but is %s" % (self.remote_user, euid))
|
||||
if type(self.module_args) not in [str, unicode, dict]:
|
||||
raise Exception("module_args must be a string or dict: %s" % self.module_args)
|
||||
raise errors.AnsibleError("module_args must be a string or dict: %s" % self.module_args)
|
||||
if self.transport == 'ssh' and self.remote_pass:
|
||||
raise errors.AnsibleError("SSH transport does not support remote passwords, only keys or agents")
|
||||
|
||||
self._tmp_paths = {}
|
||||
random.seed()
|
||||
|
|
Loading…
Reference in a new issue