From 45d32d53c9b259c5e2fa07ceadc7c72fbea6e5c4 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Fri, 23 Feb 2024 19:58:40 +0100 Subject: [PATCH] Do not consider 'Waiting' events as changes/actions. (#804) --- changelogs/fragments/804-compose-v2-waiting.yml | 2 ++ plugins/module_utils/compose_v2.py | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 changelogs/fragments/804-compose-v2-waiting.yml diff --git a/changelogs/fragments/804-compose-v2-waiting.yml b/changelogs/fragments/804-compose-v2-waiting.yml new file mode 100644 index 00000000..b960c9ec --- /dev/null +++ b/changelogs/fragments/804-compose-v2-waiting.yml @@ -0,0 +1,2 @@ +bugfixes: + - "docker_compose_v2 - do not consider a ``Waiting`` event as an action/change (https://github.com/ansible-collections/community.docker/pull/804)." diff --git a/plugins/module_utils/compose_v2.py b/plugins/module_utils/compose_v2.py index 477848a4..2a048ac1 100644 --- a/plugins/module_utils/compose_v2.py +++ b/plugins/module_utils/compose_v2.py @@ -38,7 +38,6 @@ DOCKER_STATUS_DONE = frozenset(( DOCKER_STATUS_WORKING = frozenset(( 'Creating', 'Starting', - 'Waiting', 'Restarting', 'Stopping', 'Killing', @@ -57,7 +56,10 @@ DOCKER_STATUS_PULL = frozenset(( DOCKER_STATUS_ERROR = frozenset(( 'Error', )) -DOCKER_STATUS = frozenset(DOCKER_STATUS_DONE | DOCKER_STATUS_WORKING | DOCKER_STATUS_PULL | DOCKER_STATUS_ERROR) +DOCKER_STATUS_WAITING = frozenset(( + 'Waiting', +)) +DOCKER_STATUS = frozenset(DOCKER_STATUS_DONE | DOCKER_STATUS_WORKING | DOCKER_STATUS_PULL | DOCKER_STATUS_ERROR | DOCKER_STATUS_WAITING) DOCKER_PULL_PROGRESS_DONE = frozenset(( 'Already exists',