mirror of
https://github.com/ansible/awx.git
synced 2026-01-20 14:11:24 -03:30
Emit an error message if the host doesn't exist in azure
This commit is contained in:
parent
a7e6d62e2c
commit
a8c7b0dc41
@ -117,6 +117,8 @@ class AzureInventory(object):
|
||||
"""Return information about the given hostname, based on what
|
||||
the Windows Azure API provides.
|
||||
"""
|
||||
if hostname not in self.host_metadata:
|
||||
return "No host found: %s" % hostname
|
||||
if jsonify:
|
||||
return json.dumps(self.host_metadata[hostname])
|
||||
return self.host_metadata[hostname]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user