Skip to content

roles/upgrade/tasks/handle-old-packages.yml breaks rpm exclusion feature #299

@StCyr

Description

@StCyr

In file roles/upgrade/tasks/handle-old-packages.yml packages matching the following rule are removed:

- name: handle-old-packages | Search for old packages and packages not versioned by rhel release
  ansible.builtin.shell:
    cmd: >-
      set -o pipefail;
      export PATH={{ os_path }};
      rpm -qa |
      grep -ve '[\.|+]el{{ ansible_distribution_major_version }}' |
      grep -vE '^(gpg-pubkey|libmodulemd|katello-ca-consumer)' |
      sort

This also matches non-redhat packages and breaks the rpm package exclusion feature documented in https://access.redhat.com/articles/4977891

Wouldn't be a good idea to filter out from this list packages that are found in the exclude setting in /etc/dnf/dnf.conf ?

I guess I can provide a patch if you agree with the idea.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions