1
0
mirror of https://github.com/ansible/awx.git synced 2024-10-31 23:51:09 +03:00

bwrap: Add /etc/ssh in bind mounted folder

/etc/ssh is currently not bound when run into bwrap, this leads to error
like "Bad owner or permissions on /etc/ssh/ssh_config.d/05-redhat.conf"
since it cannot access this file.
This commit is contained in:
Yanis Guenane 2019-03-08 15:20:50 +01:00
parent 7b570b59c6
commit 7eb483d810

View File

@ -831,7 +831,7 @@ def wrap_args_with_proot(args, cwd, **kwargs):
new_args = [getattr(settings, 'AWX_PROOT_CMD', 'bwrap'), '--unshare-pid', '--dev-bind', '/', '/', '--proc', '/proc']
hide_paths = [settings.AWX_PROOT_BASE_PATH]
if not kwargs.get('isolated'):
hide_paths.extend(['/etc/tower', '/var/lib/awx', '/var/log',
hide_paths.extend(['/etc/tower', '/var/lib/awx', '/var/log', '/etc/ssh',
settings.PROJECTS_ROOT, settings.JOBOUTPUT_ROOT])
hide_paths.extend(getattr(settings, 'AWX_PROOT_HIDE_PATHS', None) or [])
for path in sorted(set(hide_paths)):