From 0a2a232b7011b5135a263607483a6bfb6d5727ab Mon Sep 17 00:00:00 2001 From: konradasb Date: Tue, 21 Nov 2023 13:52:52 +0200 Subject: [PATCH] fix(roles/nerdctl_login): Always login to registry --- roles/nerdctl_login/tasks/main.yml | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/roles/nerdctl_login/tasks/main.yml b/roles/nerdctl_login/tasks/main.yml index 9e3c1ef..e178969 100644 --- a/roles/nerdctl_login/tasks/main.yml +++ b/roles/nerdctl_login/tasks/main.yml @@ -1,19 +1,8 @@ --- -- name: Get Docker config contents - ansible.builtin.slurp: - src: "{{ nerdctl_login_config_path }}" - register: nerdctl_login_docker_config - ignore_errors: true - when: - - nerdctl_login_registry_url | length > 0 - - name: Login to container registry environment: REGISTRY_PASSWORD: "{{ nerdctl_login_password }}" ansible.builtin.shell: nerdctl login -u {{ nerdctl_login_username }} -p "${REGISTRY_PASSWORD}" {{ nerdctl_login_registry_url }} + changed_when: false when: - - nerdctl_login_username | length > 0 - - nerdctl_login_password | length > 0 - nerdctl_login_registry_url | length > 0 - - nerdctl_login_docker_config['content'] is not defined or - nerdctl_login_docker_config['content'] | b64decode | from_json | json_query('auths."' ~ nerdctl_login_registry_url ~ '".auth') is not defined