diff --git a/awx/main/tasks.py b/awx/main/tasks.py index b8449d33f7..71ef56d6b1 100644 --- a/awx/main/tasks.py +++ b/awx/main/tasks.py @@ -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 diff --git a/awx/plugins/inventory/openstack.py b/awx/plugins/inventory/openstack.py index ae5fa78dce..103be1bee0 100755 --- a/awx/plugins/inventory/openstack.py +++ b/awx/plugins/inventory/openstack.py @@ -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) diff --git a/requirements/requirements.txt b/requirements/requirements.txt index 02dd347786..3764e1fd6d 100644 --- a/requirements/requirements.txt +++ b/requirements/requirements.txt @@ -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