mirror of
https://github.com/ansible-collections/community.docker.git
synced 2026-04-16 17:26:28 +00:00
Apply suggestions from code review
Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
f84cb60eb5
commit
dec0ceeec8
@ -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).
|
||||
|
||||
@ -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',
|
||||
|
||||
@ -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', '>=')
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user