Rewrite the docker_network module (#408)

* Rewrite the docker_network module.

* Update plugins/modules/docker_network.py

Co-authored-by: Brian Scholer <1260690+briantist@users.noreply.github.com>

* Improve error messages.

Co-authored-by: Brian Scholer <1260690+briantist@users.noreply.github.com>
This commit is contained in:
Felix Fontein
2022-07-06 21:47:32 +02:00
committed by GitHub
parent a406b08981
commit 4c026307fb
5 changed files with 54 additions and 76 deletions
@@ -303,10 +303,3 @@
- network_1 is changed
- network_2 is not changed
- network_3 is changed
when: docker_py_version is version('2.0.0', '>=')
- assert:
that:
- network_1 is failed
- "('version is ' ~ docker_py_version ~ ' ') in network_1.msg"
- "'Minimum version required is 2.0.0 ' in network_1.msg"
when: docker_py_version is version('2.0.0', '<')
@@ -144,9 +144,6 @@
state: absent
force: yes
# Requirements for docker_swarm
when: docker_py_version is version('2.6.0', '>=')
####################################################################
## attachable ######################################################
####################################################################
@@ -183,13 +180,6 @@
- attachable_1 is changed
- attachable_2 is not changed
- attachable_3 is changed
when: docker_py_version is version('2.0.0', '>=')
- assert:
that:
- attachable_1 is failed
- "('version is ' ~ docker_py_version ~ ' ') in attachable_1.msg"
- "'Minimum version required is 2.0.0 ' in attachable_1.msg"
when: docker_py_version is version('2.0.0', '<')
####################################################################
## labels ##########################################################