Skip to content

Commit

Permalink
FIX: Some Adjustments to Update Scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
NeoPlays authored Jun 12, 2024
1 parent 229aad6 commit 07cb4ee
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions controls/roles/update-changes/tasks/2.1.5/updates-215.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand All @@ -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
Expand All @@ -57,4 +56,4 @@

- name: Include Charon Teku Changes
include_tasks: charon_teku_changes.yaml
loop: "{{ service_config_files.files }}"
loop: "{{ service_config_files.files }}"

0 comments on commit 07cb4ee

Please sign in to comment.