Skip to content

Commit

Permalink
Write fully populated envfile to pass to podman
Browse files Browse the repository at this point in the history
Without this, manually reproducing the container's environment is really difficult.
  • Loading branch information
shanemcd committed Jun 28, 2021
1 parent a77468c commit a869b63
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ansible_runner/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,11 @@ def run(self):
# option expecting should have already been written in ansible_runner.runner_config
env_file_host = os.path.join(self.config.artifact_dir, 'env.list')
with open(env_file_host, 'w') as f:
f.write('\n'.join(list(self.config.env.keys())))
f.write(
'\n'.join(
["{}={}".format(key, value) for key, value in self.config.env.items()]
)
)
else:
cwd = self.config.cwd
pexpect_env = self.config.env
Expand Down

0 comments on commit a869b63

Please sign in to comment.