redhat-cop / infra.leapp

Collection of Ansible roles for automating RHEL in-place upgrades using Leapp.
MIT License
43 stars 33 forks source link

Allow providing a list of known inhibitors #192

Closed myllynen closed 1 month ago

myllynen commented 1 month ago

Add a variable to allow providing a list of keys of known inhibitors, these known inhibitors will be ignored when setting leapp_inhibitors and considering the value for upgrade_inhibited.

Example usage, here VDO related inhibitors are listed as known and they will not cause the playbook to fail on any host:

    leapp_known_inhibitors:
      # vdo check
      - 2f9802dc91315806c7cdc3c18d7b74f2a2383285
      # vdo package
      - 429a99e13b19a7eebadbb8cb35233d8119bcf255
  tasks:
    - name: Generate preupgrade analysis report
      ansible.builtin.import_role:
        name: infra.leapp.analysis

    - name: Fail if unknown inhibitors found
      fail:
        msg: Unknown inhibitors found, see the logs for details.
      when: upgrade_inhibited

This is helpful when dealing with a large number of hosts and where remediations for the known inhibitors are available, for any new hosts only unknown or unhandled inhibitors would cause the playbook to fail and thus the need to investigate in detail.

Resolves #123