Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch default to true.
Browse files Browse the repository at this point in the history
felixfontein committed Dec 14, 2024
1 parent 0be7afc commit 882755e
Showing 2 changed files with 8 additions and 6 deletions.
8 changes: 5 additions & 3 deletions changelogs/fragments/1011-docker_compose_v2-build-changed.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
minor_changes:
- "docker_compose_v2 - add ``ignore_build_events`` option (default value ``false``) which allows to ignore build events for change detection.
This can be useful if ``build=always`` is set, to avoid having a changed status if the image was rebuilt, but the containers using it were not
restarted since the image did not change
- "docker_compose_v2 - add ``ignore_build_events`` option (default value ``true``) which allows to (not) ignore build events for change detection
(https://github.com/ansible-collections/community.docker/issues/1005, https://github.com/ansible-collections/community.docker/issues/pull/1011)."
bugfixes:
- "docker_compose_v2 - when using Compose 2.31.0 or newer, revert to the old behavior that image rebuilds, for example if ``rebuild=always``, only
result in ``changed`` if a container has been restarted
(https://github.com/ansible-collections/community.docker/issues/1005, https://github.com/ansible-collections/community.docker/issues/pull/1011)."
6 changes: 3 additions & 3 deletions plugins/modules/docker_compose_v2.py
Original file line number Diff line number Diff line change
@@ -88,9 +88,9 @@
- If O(state=present) and O(ignore_build_events=true) and O(build=always), a rebuild that does
not trigger a container restart no longer results in RV(ignore:changed=true).
- Note that Docker Compose 2.31.0 is the first Compose 2.x version to emit build events.
For older versions, the behavior is always as if O(ignore_build_events=false).
For older versions, the behavior is always as if O(ignore_build_events=true).
type: bool
default: false
default: true
version_added: 4.2.0
recreate:
description:
@@ -650,7 +650,7 @@ def main():
scale=dict(type='dict'),
wait=dict(type='bool', default=False),
wait_timeout=dict(type='int'),
ignore_build_events=dict(type='bool', default=False),
ignore_build_events=dict(type='bool', default=True),
)
argspec_ex = common_compose_argspec_ex()
argument_spec.update(argspec_ex.pop('argspec'))

0 comments on commit 882755e

Please sign in to comment.