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

@ -1153,7 +1153,7 @@ class RunInventoryUpdate(BaseTask):
env['GCE_PROJECT'] = passwords.get('source_project', '')
env['GCE_PEM_FILE_PATH'] = cloud_credential
elif inventory_update.source == 'openstack':
env['OPENSTACK_CONFIG_FILE'] = cloud_credential
env['OS_CLIENT_CONFIG_FILE'] = cloud_credential
elif inventory_update.source == 'file':
# FIXME: Parse source_env to dict, update env.
pass

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)

View File

@ -55,7 +55,7 @@ msgpack-python==0.4.6
netaddr==0.7.14
netifaces==0.10.4
ordereddict==1.1
os-client-config==0.6.0
os-client-config==1.6.1
os-diskconfig-python-novaclient-ext==0.1.2
oslo.config==1.9.3
oslo.i18n==1.5.0