mirror of
https://github.com/ansible/awx.git
synced 2026-03-06 03:01:06 -03: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
|
||||
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]
|
||||
|
||||
Reference in New Issue
Block a user