Fix idempotency of docker_compose_v2_pull. (#814)

This commit is contained in:
Felix Fontein
2024-03-13 13:20:11 +01:00
committed by GitHub
parent 6600f501ae
commit 4bab9a6b0e
5 changed files with 33 additions and 18 deletions
+2
View File
@@ -31,6 +31,8 @@ extends_documentation_fragment:
attributes:
check_mode:
support: full
details:
- In check mode, pulling the image does not result in a changed result.
diff_mode:
support: none
+5 -1
View File
@@ -29,6 +29,10 @@ extends_documentation_fragment:
attributes:
check_mode:
support: full
details:
- If O(policy=always), the module will always indicate a change.
Docker Compose does not give any information whether pulling would
update the image or not.
diff_mode:
support: none
@@ -131,7 +135,7 @@ class PullManager(BaseComposeManager):
rc, stdout, stderr = self.client.call_cli(*args, cwd=self.project_src)
events = self.parse_events(stderr, dry_run=self.check_mode)
self.emit_warnings(events)
self.update_result(result, events, stdout, stderr)
self.update_result(result, events, stdout, stderr, ignore_service_pull_events=self.policy != 'missing' and not self.check_mode)
self.update_failed(result, events, args, stdout, stderr, rc)
self.cleanup_result(result)
return result