mirror of
https://github.com/ansible/awx.git
synced 2026-05-09 10:27:37 -02:30
Incorporate OpenStack inventory changes from https://github.com/ansible/ansible/pull/11447 back into Tower.
This commit is contained in:
@@ -1153,7 +1153,7 @@ class RunInventoryUpdate(BaseTask):
|
|||||||
env['GCE_PROJECT'] = passwords.get('source_project', '')
|
env['GCE_PROJECT'] = passwords.get('source_project', '')
|
||||||
env['GCE_PEM_FILE_PATH'] = cloud_credential
|
env['GCE_PEM_FILE_PATH'] = cloud_credential
|
||||||
elif inventory_update.source == 'openstack':
|
elif inventory_update.source == 'openstack':
|
||||||
env['OPENSTACK_CONFIG_FILE'] = cloud_credential
|
env['OS_CLIENT_CONFIG_FILE'] = cloud_credential
|
||||||
elif inventory_update.source == 'file':
|
elif inventory_update.source == 'file':
|
||||||
# FIXME: Parse source_env to dict, update env.
|
# FIXME: Parse source_env to dict, update env.
|
||||||
pass
|
pass
|
||||||
|
|||||||
@@ -52,8 +52,6 @@ class OpenStackInventory(object):
|
|||||||
|
|
||||||
def __init__(self, private=False, refresh=False):
|
def __init__(self, private=False, refresh=False):
|
||||||
config_files = os_client_config.config.CONFIG_FILES
|
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')
|
config_files.append('/etc/ansible/openstack.yml')
|
||||||
self.openstack_config = os_client_config.config.OpenStackConfig(
|
self.openstack_config = os_client_config.config.OpenStackConfig(
|
||||||
config_files)
|
config_files)
|
||||||
@@ -156,7 +154,8 @@ def main():
|
|||||||
elif args.host:
|
elif args.host:
|
||||||
inventory.get_host(args.host)
|
inventory.get_host(args.host)
|
||||||
except shade.OpenStackCloudException as e:
|
except shade.OpenStackCloudException as e:
|
||||||
sys.exit(e.message)
|
sys.stderr.write('%s\n' % e.message)
|
||||||
|
sys.exit(1)
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ msgpack-python==0.4.6
|
|||||||
netaddr==0.7.14
|
netaddr==0.7.14
|
||||||
netifaces==0.10.4
|
netifaces==0.10.4
|
||||||
ordereddict==1.1
|
ordereddict==1.1
|
||||||
os-client-config==0.6.0
|
os-client-config==1.6.1
|
||||||
os-diskconfig-python-novaclient-ext==0.1.2
|
os-diskconfig-python-novaclient-ext==0.1.2
|
||||||
oslo.config==1.9.3
|
oslo.config==1.9.3
|
||||||
oslo.i18n==1.5.0
|
oslo.i18n==1.5.0
|
||||||
|
|||||||
Reference in New Issue
Block a user