From 01083d7e56d0af0a6830b307ba3b673873400f95 Mon Sep 17 00:00:00 2001 From: Dawa Ometto Date: Tue, 12 Mar 2024 13:38:25 +0100 Subject: [PATCH 1/3] podman login: omit certdir value by default --- src/molecule_plugins/podman/playbooks/create.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/molecule_plugins/podman/playbooks/create.yml b/src/molecule_plugins/podman/playbooks/create.yml index 88b14864..12d73a0c 100644 --- a/src/molecule_plugins/podman/playbooks/create.yml +++ b/src/molecule_plugins/podman/playbooks/create.yml @@ -11,9 +11,7 @@ - name: Log into a container registry containers.podman.podman_login: certdir: >- - {% if lookup('env', 'DOCKER_CERT_PATH') %} - {{ item.cert_path | default(lookup('env', 'DOCKER_CERT_PATH') + '/cert.pem') }} - {% endif %} + {% if lookup('env', 'DOCKER_CERT_PATH') %}{{ item.cert_path | default(lookup('env', 'DOCKER_CERT_PATH') + '/cert.pem') }}{% else %}{{ item.cert_path | default(omit) }}{% endif %} executable: "{{ podman_exec }}" username: "{{ item.registry.credentials.username }}" password: "{{ item.registry.credentials.password }}" From feee2898088603a825cc5d4a18af533f776e3240 Mon Sep 17 00:00:00 2001 From: Dawa Ometto Date: Tue, 12 Mar 2024 14:10:41 +0100 Subject: [PATCH 2/3] podman login: disable log --- src/molecule_plugins/podman/playbooks/create.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/src/molecule_plugins/podman/playbooks/create.yml b/src/molecule_plugins/podman/playbooks/create.yml index 12d73a0c..1aba19f2 100644 --- a/src/molecule_plugins/podman/playbooks/create.yml +++ b/src/molecule_plugins/podman/playbooks/create.yml @@ -28,6 +28,7 @@ - item.registry.credentials is defined - item.registry.credentials.username is defined changed_when: false + no_log: true - name: Check presence of custom Dockerfiles ansible.builtin.stat: From a15c7e110d41c379edd469eb83998b91ca9d9772 Mon Sep 17 00:00:00 2001 From: Dawa Ometto Date: Tue, 12 Mar 2024 14:27:04 +0100 Subject: [PATCH 3/3] Bypass linter --- src/molecule_plugins/podman/playbooks/create.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/molecule_plugins/podman/playbooks/create.yml b/src/molecule_plugins/podman/playbooks/create.yml index 1aba19f2..76cbeec6 100644 --- a/src/molecule_plugins/podman/playbooks/create.yml +++ b/src/molecule_plugins/podman/playbooks/create.yml @@ -11,7 +11,7 @@ - name: Log into a container registry containers.podman.podman_login: certdir: >- - {% if lookup('env', 'DOCKER_CERT_PATH') %}{{ item.cert_path | default(lookup('env', 'DOCKER_CERT_PATH') + '/cert.pem') }}{% else %}{{ item.cert_path | default(omit) }}{% endif %} + {% if lookup('env', 'DOCKER_CERT_PATH') %}{{ item.cert_path | default(lookup('env', 'DOCKER_CERT_PATH') + '/cert.pem') }}{% else %}{{ item.cert_path | default(omit) }}{% endif %} # noqa yaml[line-length] jinja[spacing] executable: "{{ podman_exec }}" username: "{{ item.registry.credentials.username }}" password: "{{ item.registry.credentials.password }}"