mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Also use DOCKER_TLS_VERIFY env var to turn on tls verification
This commit is contained in:
parent
1bb98542d3
commit
f892ca5b8f
1 changed files with 4 additions and 0 deletions
|
@ -546,6 +546,7 @@ class DockerManager(object):
|
||||||
# Connect to the docker server using any configured host and TLS settings.
|
# Connect to the docker server using any configured host and TLS settings.
|
||||||
|
|
||||||
env_host = os.getenv('DOCKER_HOST')
|
env_host = os.getenv('DOCKER_HOST')
|
||||||
|
env_docker_verify = os.getenv('DOCKER_TLS_VERIFY')
|
||||||
env_cert_path = os.getenv('DOCKER_CERT_PATH')
|
env_cert_path = os.getenv('DOCKER_CERT_PATH')
|
||||||
env_docker_hostname = os.getenv('DOCKER_TLS_HOSTNAME')
|
env_docker_hostname = os.getenv('DOCKER_TLS_HOSTNAME')
|
||||||
|
|
||||||
|
@ -593,6 +594,9 @@ class DockerManager(object):
|
||||||
# or tls_ca_cert (which requests verifying the server with
|
# or tls_ca_cert (which requests verifying the server with
|
||||||
# a specific ca certificate)
|
# a specific ca certificate)
|
||||||
use_tls = module.params.get('use_tls')
|
use_tls = module.params.get('use_tls')
|
||||||
|
if use_tls is None and env_docker_verify is not None:
|
||||||
|
use_tls = 'verify'
|
||||||
|
|
||||||
tls_config = None
|
tls_config = None
|
||||||
if use_tls != 'no':
|
if use_tls != 'no':
|
||||||
params = {}
|
params = {}
|
||||||
|
|
Loading…
Reference in a new issue