mirror of
https://github.com/ansible-collections/community.docker.git
synced 2026-04-16 17:26:28 +00:00
chore(docker_swarm_service): Add a check for minimum version
This commit is contained in:
parent
8064209b0d
commit
64c20cb0ee
@ -2758,6 +2758,12 @@ def main():
|
||||
) is not None,
|
||||
usage_msg='set rollback_config.order'
|
||||
),
|
||||
mode=dict(
|
||||
docker_py_version='6.0.0',
|
||||
docker_api_version='1.41',
|
||||
detect_usage=lambda c: c.module.get('mode') == 'replicated-job',
|
||||
usage_msg='set mode'
|
||||
),
|
||||
)
|
||||
required_if = [
|
||||
('state', 'present', ['image'])
|
||||
|
||||
@ -1352,6 +1352,11 @@
|
||||
- mode_6 is changed
|
||||
when: docker_api_version is version('1.41', '>=') and docker_py_version is version('6.0.0', '>=')
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- mode_4 is failed
|
||||
- "'Minimum version required' in mode_4.msg"
|
||||
when: docker_api_version is version('1.41', '<') or docker_py_version is version('6.0.0', '<')
|
||||
|
||||
####################################################################
|
||||
## stop_grace_period ###############################################
|
||||
|
||||
Loading…
Reference in New Issue
Block a user