From 85236b7efc9ef6319791086046de0addcbc1d8f4 Mon Sep 17 00:00:00 2001 From: Bjorn Oscarsson Date: Sat, 9 Mar 2024 11:52:07 +0100 Subject: [PATCH 1/2] Fixes #410 --- tasks/nexus_install.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tasks/nexus_install.yml b/tasks/nexus_install.yml index fd4f9404..74fc1f7a 100644 --- a/tasks/nexus_install.yml +++ b/tasks/nexus_install.yml @@ -77,7 +77,7 @@ mode: "0644" check_mode: false register: download_status - until: download_status.status_code == 200 + until: download_status.status_code == 200 or download_status.status_code == 304 retries: "{{ nexus_download_retries }}" delay: "{{ nexus_download_delay }}" notify: @@ -449,6 +449,10 @@ owner: root group: root mode: "0644" + register: download_status + until: download_status.status_code == 200 or download_status.status_code == 304 + retries: "{{ nexus_download_retries }}" + delay: "{{ nexus_download_delay }}" with_items: "{{ nexus_plugin_urls }}" - name: Run all notified handlers now From 48de46a64f6fdc735548fe4281aa67078ca09307 Mon Sep 17 00:00:00 2001 From: Bjorn Oscarsson Date: Tue, 26 Mar 2024 22:29:41 +0100 Subject: [PATCH 2/2] Fix when status_code is not defined in download_status --- tasks/nexus_install.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tasks/nexus_install.yml b/tasks/nexus_install.yml index 74fc1f7a..5c3b6e49 100644 --- a/tasks/nexus_install.yml +++ b/tasks/nexus_install.yml @@ -77,7 +77,9 @@ mode: "0644" check_mode: false register: download_status - until: download_status.status_code == 200 or download_status.status_code == 304 + until: + - download_status.status_code is defined + - download_status.status_code == 200 or download_status.status_code == 304 retries: "{{ nexus_download_retries }}" delay: "{{ nexus_download_delay }}" notify: @@ -450,7 +452,9 @@ group: root mode: "0644" register: download_status - until: download_status.status_code == 200 or download_status.status_code == 304 + until: + - download_status.status_code is defined + - download_status.status_code == 200 or download_status.status_code == 304 retries: "{{ nexus_download_retries }}" delay: "{{ nexus_download_delay }}" with_items: "{{ nexus_plugin_urls }}"