mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-24 05:40:23 -07:00
Merge pull request #9702 from bcoca/better_errors_on_delegate
better exception handling with delegated hosts
This commit is contained in:
commit
2ef5d6be1e
2 changed files with 16 additions and 16 deletions
|
@ -420,7 +420,7 @@ class Inventory(object):
|
|||
|
||||
group = self.get_group(groupname)
|
||||
if group is None:
|
||||
raise Exception("group not found: %s" % groupname)
|
||||
raise errors.AnsibleError("group not found: %s" % groupname)
|
||||
|
||||
vars = {}
|
||||
|
||||
|
@ -439,7 +439,7 @@ class Inventory(object):
|
|||
|
||||
host = self.get_host(hostname)
|
||||
if not host:
|
||||
raise Exception("host not found: %s" % hostname)
|
||||
raise errors.AnsibleError("host not found: %s" % hostname)
|
||||
return host.get_variables()
|
||||
|
||||
def get_host_variables(self, hostname, update_cached=False, vault_password=None):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue