Skip to content

Commit

Permalink
the ultimate final fix
Browse files Browse the repository at this point in the history
  • Loading branch information
NeoPlays committed Jun 10, 2024
1 parent 70ceeb9 commit 50e3bdb
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions controls/roles/update-changes/tasks/2.1.5/updates-215.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
---
- name: Find service configs
find:
paths: "/etc/stereum/services"
register: service_config_files

- name: Include ValidatorEjector Changes
include_tasks: ValidatorEjector_changes.yaml
loop: "{{ service_config_files.files }}"
loop_control:
loop_var: config_file_path

- 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
Expand All @@ -13,17 +25,9 @@
uuids: "{{ filtered_files | map('basename') | map('regex_replace', '\\.yaml$', '') | list }}"
when: filtered_files | length > 0

- name: Find all files in /etc/stereum/services
find:
paths: "/etc/stereum/services"
recurse: yes
patterns: "*.yaml"
register: all_files
when: filtered_files | length > 0

- name: Check if files contain any of the extracted UUIDs
shell: "grep -lE '{{ uuids | join('|') }}' {{ item.path }}"
with_items: "{{ all_files.files }}"
with_items: "{{ service_config_files.files }}"
register: uuid_grep_result
failed_when: false
changed_when: false
Expand Down

0 comments on commit 50e3bdb

Please sign in to comment.