- name: "LOGIC: EXTRACT METADATA FROM RPM FILENAME"
ansible.builtin.set_fact:
# We define the basename variable once to make the rest cleaner
_filename: "{{ found_rpms.files[0].path | basename }}"
manifest_data: "{{ remote_manifest.content | b64decode | from_json }}"
# Extraction logic applied to the first file only
app_architecture: "{{ _filename | regex_replace('^.*\\.([^.]+)\\.rpm$', '\\1') }}"
app_version: "{{ _filename | regex_replace('^.*-([^-]+)\\.[^.]+\\.rpm$', '\\1') }}"
app_prefix: "{{ _filename | regex_replace('-' + (_filename | regex_replace('^.*-([^-]+)\\.[^.]+\\.rpm$', '\\1')) + '\\..*', '') }}"
when: found_rpms.matched > 0
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)