docker: improve TLS config (#53906)

* Stop repeating names of common config arguments in docker_container.

* Prefer tls_verify over tls for docker modules and docker_swarm inventory plugin.

* tls and tls_verify are no longer mutually exclusive.

* Share setup code between docker_* modules and docker_swarm inventory plugin.

* Add support for more parameters.

* PEP8.

* Fix typo.

* Rename host -> docker_host.
This commit is contained in:
Felix Fontein 2019-03-17 22:10:40 +01:00 committed by ansibot
parent 410a1d2161
commit 29d6418822
4 changed files with 152 additions and 163 deletions

View file

@ -71,8 +71,8 @@ options:
type: str
tls:
description:
- Secure the connection to the API by using TLS without verifying the authenticity of the Docker host
server.
- Secure the connection to the API by using TLS without verifying the authenticity of the Docker host
server. Note that if C(tls_verify) is set to C(yes) as well, it will take precedence.
- If the value is not specified in the task, the value of environment variable C(DOCKER_TLS) will be used
instead. If the environment variable is not set, the default value will be used.
type: bool