docker_container: add networks_cli_compatible option (#54198)

* Adding networks_cli_compatible option.

* Move network tests into own test file.

* Extend tests (for networks_cli_compatible=no).

* Adding tests for networks_cli_compatible=yes.

* There seems to be no way to create a container without at least one network attached.

* Integrate networks / purge_networks with comparisons.

* Speed up tests.

* Removing double dot.

* Add changelog.

* Use comparisons value only if the networks option has been specified. purge_networks on the other hand also removes networks if it has not been specified.
This commit is contained in:
Felix Fontein
2019-03-25 20:06:21 +01:00
committed by ansibot
parent af669dec24
commit 4fac91bed5
4 changed files with 624 additions and 204 deletions

View File

@@ -0,0 +1,5 @@
minor_changes:
- "docker_container - a new option ``networks_cli_compatible`` with default value ``no`` has been added. The default value
will change to ``yes`` in Ansible 2.12. Setting it to ``yes`` lets the module behave similar to ``docker create --network``
when at least one network is specified, i.e. the default network is not automatically attached to the container in this
case."