From 07cb4eeece2302ad6e46fcb790dca05ed165f82b Mon Sep 17 00:00:00 2001 From: NeoPlays <80448387+NeoPlays@users.noreply.github.com> Date: Wed, 12 Jun 2024 12:36:45 +0200 Subject: [PATCH] FIX: Some Adjustments to Update Scripts --- .../roles/update-changes/tasks/2.1.5/updates-215.yaml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/controls/roles/update-changes/tasks/2.1.5/updates-215.yaml b/controls/roles/update-changes/tasks/2.1.5/updates-215.yaml index 12974d13b..645ca5d03 100644 --- a/controls/roles/update-changes/tasks/2.1.5/updates-215.yaml +++ b/controls/roles/update-changes/tasks/2.1.5/updates-215.yaml @@ -11,7 +11,7 @@ - name: Filter files that contain both regex patterns shell: "grep -rlE 'service: CharonService' /etc/stereum/services | xargs grep -lE 'image: obolnetwork/charon:v1\\.[0-9]+\\.[0-9]+'" register: grep_result - failed_when: false + ignore_errors: true changed_when: false - name: Set fact for filtered files @@ -21,13 +21,12 @@ - name: Extract UUIDs from filtered filenames set_fact: uuids: "{{ filtered_files | map('basename') | map('regex_replace', '\\.yaml$', '') | list }}" - when: filtered_files | length > 0 - name: Check if files contain any of the extracted UUIDs shell: "grep -lE '{{ uuids | join('|') }}' {{ item.path }}" with_items: "{{ service_config_files.files }}" register: uuid_grep_result - failed_when: false + ignore_errors: true changed_when: false when: uuids | length > 0 @@ -39,14 +38,14 @@ - name: Debug files with UUIDs debug: var: files_with_uuids - when: files_with_uuids | length > 0 + when: files_with_uuids defined and files_with_uuids | length > 0 - name: Include SDVT Changes include_tasks: sdvt_changes.yaml loop: "{{ files_with_uuids }}" loop_control: loop_var: config_file_path - when: files_with_uuids | length > 0 + when: files_with_uuids defined and files_with_uuids | length > 0 - name: Include Charon Changes include_tasks: charon_changes.yaml @@ -57,4 +56,4 @@ - name: Include Charon Teku Changes include_tasks: charon_teku_changes.yaml - loop: "{{ service_config_files.files }}" \ No newline at end of file + loop: "{{ service_config_files.files }}"