Allow jobs to run in the base ansible-runner image (#8949)

This commit is contained in:
Alan Rominger 2020-12-18 10:01:00 -05:00 committed by Shane McDonald
parent eb5bf599e3
commit 90b9c7861c

View File

@ -1137,7 +1137,7 @@ class BaseTask(object):
fn = os.path.join(path, 'hosts')
with open(fn, 'w') as f:
os.chmod(fn, stat.S_IRUSR | stat.S_IXUSR | stat.S_IWUSR)
f.write('#! /usr/bin/env python\n# -*- coding: utf-8 -*-\nprint(%r)\n' % json_data)
f.write('#! /usr/bin/env python3\n# -*- coding: utf-8 -*-\nprint(%r)\n' % json_data)
return fn
def build_args(self, instance, private_data_dir, passwords):