mirror of
https://github.com/ansible/awx.git
synced 2026-03-01 00:38:45 -03:30
properly detect ansible-playbook vs ansible runs in bwrap arg building
a recent change (65641c7) made it so that we call
ansible-playbook using its _absolute path_ (i.e.,
/usr/bin/ansible-playbook, /var/lib/venv/xyz/bin/ansible-playbook), so
this logic is no longer correct
This commit is contained in:
@@ -882,7 +882,7 @@ def wrap_args_with_proot(args, cwd, **kwargs):
|
|||||||
path = os.path.realpath(path)
|
path = os.path.realpath(path)
|
||||||
new_args.extend(['--bind', '%s' % (path,), '%s' % (path,)])
|
new_args.extend(['--bind', '%s' % (path,), '%s' % (path,)])
|
||||||
if kwargs.get('isolated'):
|
if kwargs.get('isolated'):
|
||||||
if 'ansible-playbook' in args:
|
if '/bin/ansible-playbook' in ' '.join(args):
|
||||||
# playbook runs should cwd to the SCM checkout dir
|
# playbook runs should cwd to the SCM checkout dir
|
||||||
new_args.extend(['--chdir', os.path.join(kwargs['private_data_dir'], 'project')])
|
new_args.extend(['--chdir', os.path.join(kwargs['private_data_dir'], 'project')])
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user