DEV Community

Query Filter
Query Filter

Posted on

docker59

- name: "FORCE REMOVE PRIOR VERSIONS FROM FILENAME"
  ansible.builtin.shell: |
    {{ pkg_manager }} remove -y {{ found_rpms.files[0].path | basename | regex_replace('-.*\\.rpm$', '') }}* || true
  vars:
    pkg_manager: "/usr/bin/yum"
  args:
    warn: false
  become: no
  # noqa: fqcn[action-core] command-shell  # Dynamic package extraction
Enter fullscreen mode Exit fullscreen mode

Top comments (0)