Re-order authfile option to make inventory import command work

This commit is contained in:
Alan Rominger 2021-10-28 15:25:45 -04:00 committed by Shane McDonald
parent db7fb81855
commit d42fe921db
No known key found for this signature in database
GPG Key ID: 6F374AF6E9EB9374

View File

@ -80,7 +80,6 @@ class AnsibleInventoryLoader(object):
for key, value in STANDARD_INVENTORY_UPDATE_ENV.items():
bargs.extend(['-e', '{0}={1}'.format(key, value)])
ee = get_default_execution_environment()
bargs.extend([ee.image])
if ee.credential:
if not ee.credential.has_inputs(field_names=('host', 'username', 'password')):
@ -97,6 +96,8 @@ class AnsibleInventoryLoader(object):
if ee.pull:
bargs.append(f'--pull={ee.pull}')
bargs.extend([ee.image])
bargs.extend(['ansible-inventory', '-i', self.source])
bargs.extend(['--playbook-dir', functioning_dir(self.source)])
if self.verbosity: