Apply suggestions from code review

Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
tpourcelot 2025-08-02 17:18:56 +02:00 committed by GitHub
parent f84cb60eb5
commit dec0ceeec8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 4 additions and 4 deletions

View File

@ -1,2 +1,2 @@
minor_changes:
- docker_swarm_service - Add support for ``replicated-job`` mode for Swarm services (https://github.com/ansible-collections/community.docker/issues/626)
- docker_swarm_service - add support for ``replicated-job`` mode for Swarm services (https://github.com/ansible-collections/community.docker/issues/626, https://github.com/ansible-collections/community.docker/pull/1108).

View File

@ -237,7 +237,7 @@ options:
- Service replication mode.
- Service will be removed and recreated when changed.
- Corresponds to the C(--mode) option of C(docker service create).
- The value V(replicated-job) was added in community.docker 4.7.0 and requires API version >= 1.41.
- The value V(replicated-job) was added in community.docker 4.7.0, and requires API version >= 1.41 and Docker SDK for Python >= 6.0.0.
type: str
default: replicated
choices:
@ -2758,7 +2758,7 @@ def main():
) is not None,
usage_msg='set rollback_config.order'
),
mode=dict(
mode_replicated_job=dict(
docker_py_version='6.0.0',
docker_api_version='1.41',
detect_usage=lambda c: c.module.params.get('mode') == 'replicated-job',

View File

@ -1348,7 +1348,7 @@
- assert:
that:
- mode_4 is changed
- mode_5 is not changed
- mode_5 is not changed and mode_5 is not failed
- mode_6 is changed
when: docker_api_version is version('1.41', '>=') and docker_py_version is version('6.0.0', '>=')