From ae6eec6833f44d1255955f6be2ce855ad87fde17 Mon Sep 17 00:00:00 2001 From: Dawa Ometto Date: Thu, 30 Nov 2023 20:00:12 +0100 Subject: [PATCH] Disable registry login when registry.url is empty (#214) * Disable registry login when registry.url is empty * Update create.yml * Update src/molecule_plugins/docker/playbooks/create.yml Co-authored-by: Jack --------- Co-authored-by: Jack --- src/molecule_plugins/docker/playbooks/create.yml | 1 + src/molecule_plugins/podman/playbooks/create.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/src/molecule_plugins/docker/playbooks/create.yml b/src/molecule_plugins/docker/playbooks/create.yml index 3a3dcf0c..148c48ed 100644 --- a/src/molecule_plugins/docker/playbooks/create.yml +++ b/src/molecule_plugins/docker/playbooks/create.yml @@ -29,6 +29,7 @@ with_items: "{{ molecule_yml.platforms }}" when: - item.registry is defined + - item.registry.url is defined and item.registry.url - item.registry.credentials is defined - item.registry.credentials.username is defined no_log: true diff --git a/src/molecule_plugins/podman/playbooks/create.yml b/src/molecule_plugins/podman/playbooks/create.yml index a65fe633..62ebc4a4 100644 --- a/src/molecule_plugins/podman/playbooks/create.yml +++ b/src/molecule_plugins/podman/playbooks/create.yml @@ -33,6 +33,7 @@ {{ item.registry.credentials.username | default('None specified') }}" when: - item.registry is defined + - item.registry.url is defined and item.registry.url - item.registry.credentials is defined - item.registry.credentials.username is defined changed_when: false