Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PR #992/e3b36e5f backport][stable-3] module docker_compose_v2_run: fix env argument #994

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bugfixes:
- "docker_compose_v2_exec, docker_compose_v2_run - fix missing ``--env`` flag while assembling env arguments (https://github.com/ansible-collections/community.docker/pull/992)."
1 change: 1 addition & 0 deletions plugins/modules/docker_compose_v2_exec.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ def get_exec_cmd(self, dry_run, no_start=False):
args.append('--no-TTY')
if self.env:
for name, value in list(self.env.items()):
args.append('--env')
args.append('{0}={1}'.format(name, value))
args.append('--')
args.append(self.service)
Expand Down
1 change: 1 addition & 0 deletions plugins/modules/docker_compose_v2_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,7 @@ def get_run_cmd(self, dry_run, no_start=False):
args.append('--no-TTY')
if self.env:
for name, value in list(self.env.items()):
args.append('--env')
args.append('{0}={1}'.format(name, value))
args.append('--')
args.append(self.service)
Expand Down
Loading