Skip to content

Commit

Permalink
Add services after -- and not before.
Browse files Browse the repository at this point in the history
  • Loading branch information
felixfontein committed Jul 25, 2024
1 parent e4819f9 commit 12b10d0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions changelogs/fragments/942-compose-v2-pull.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
minor_changes:
- "docker_compose_v2_pull - add new options ``ignore_buildable``, ``include_deps``, and ``services``
(https://github.com/ansible-collections/community.docker/issues/941, https://github.com/ansible-collections/community.docker/pull/942)."
bugfixes:
- "docker_compose_v2 - make sure that services provided in ``services`` are appended to the command line after ``--`` and not before it
(https://github.com/ansible-collections/community.docker/pull/942)."
8 changes: 4 additions & 4 deletions plugins/modules/docker_compose_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -497,9 +497,9 @@ def get_up_cmd(self, dry_run, no_start=False):
args.append('--no-start')
if dry_run:
args.append('--dry-run')
args.append('--')
for service in self.services:
args.append(service)
args.append('--')
return args

def cmd_up(self):
Expand All @@ -518,9 +518,9 @@ def get_stop_cmd(self, dry_run):
args.extend(['--timeout', '%d' % self.timeout])
if dry_run:
args.append('--dry-run')
args.append('--')
for service in self.services:
args.append(service)
args.append('--')
return args

def _are_containers_stopped(self):
Expand Down Expand Up @@ -571,9 +571,9 @@ def get_restart_cmd(self, dry_run):
args.extend(['--timeout', '%d' % self.timeout])
if dry_run:
args.append('--dry-run')
args.append('--')
for service in self.services:
args.append(service)
args.append('--')
return args

def cmd_restart(self):
Expand All @@ -598,9 +598,9 @@ def get_down_cmd(self, dry_run):
args.extend(['--timeout', '%d' % self.timeout])
if dry_run:
args.append('--dry-run')
args.append('--')
for service in self.services:
args.append(service)
args.append('--')
return args

def cmd_down(self):
Expand Down

0 comments on commit 12b10d0

Please sign in to comment.