Incorporate OpenStack inventory changes from https://github.com/ansible/ansible/pull/11447 back into Tower.

This commit is contained in:
Chris Church
2015-08-10 15:49:12 -04:00
parent 4480c05d4e
commit 6c409404ba
3 changed files with 4 additions and 5 deletions

View File

@@ -52,8 +52,6 @@ class OpenStackInventory(object):
def __init__(self, private=False, refresh=False):
config_files = os_client_config.config.CONFIG_FILES
if os.environ.get('OPENSTACK_CONFIG_FILE', None):
config_files.insert(0, os.environ['OPENSTACK_CONFIG_FILE'])
config_files.append('/etc/ansible/openstack.yml')
self.openstack_config = os_client_config.config.OpenStackConfig(
config_files)
@@ -156,7 +154,8 @@ def main():
elif args.host:
inventory.get_host(args.host)
except shade.OpenStackCloudException as e:
sys.exit(e.message)
sys.stderr.write('%s\n' % e.message)
sys.exit(1)
sys.exit(0)