mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Merge pull request #155 from jhoekx/inventory-error-fixes
Inventory: AnsibleError is not global...
This commit is contained in:
commit
ff1b200644
1 changed files with 2 additions and 2 deletions
|
@ -218,7 +218,7 @@ class Inventory(object):
|
|||
def set_variables(host, variables):
|
||||
for variable in variables:
|
||||
if len(variable) != 1:
|
||||
raise AnsibleError("Only one item expected in %s"%(variable))
|
||||
raise errors.AnsibleError("Only one item expected in %s"%(variable))
|
||||
k, v = variable.items()[0]
|
||||
self._set_variable(host, k, v)
|
||||
|
||||
|
@ -235,7 +235,7 @@ class Inventory(object):
|
|||
|
||||
return host_name
|
||||
else:
|
||||
raise AnsibleError("Unknown item in inventory: %s"%(item))
|
||||
raise errors.AnsibleError("Unknown item in inventory: %s"%(item))
|
||||
|
||||
|
||||
def _get_variables_from_script(self, host):
|
||||
|
|
Loading…
Reference in a new issue