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