1
0
Fork 0
mirror of https://github.com/containers/ansible-podman-collections.git synced 2026-04-27 19:38:47 +00:00

Handle tlsverify correctly in podman_login (#365)

This commit is contained in:
Radovan Dražný 2022-01-06 16:00:10 +01:00 committed by GitHub
parent 9860b78ce5
commit 42dc5be784
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -103,7 +103,10 @@ def login(module, executable, registry, authfile,
if certdir:
command.extend(['--cert-dir', certdir])
if tlsverify is not None:
command.extend(['--tls-verify', tlsverify])
if tlsverify:
command.append('--tls-verify')
else:
command.append('--tls-verify=False')
rc, out, err = module.run_command(command)
if rc != 0:
if 'Error: Not logged into' not in err: