Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-123026

fix: Skip the loopback profile when deleting all profiles except the ones explicitly included

Linking RHIVOS CVEs to...Migration: Automation ...Sync from "Extern...XMLWordPrintable

    • 0
    • Dev ack
    • False
    • False
    • Hide

      None

      Show
      None
    • Yes
    • Red Hat Enterprise Linux
    • SysRoles Parking Lot
    • Bug Fix
    • Hide
      The `network` RHEL system role no longer reports an incorrect state when removing profiles
      +
      Before this release, when you used the `network` RHEL system role with the `persistent_state: absent` setting to remove undefined profiles, the role attempted to delete the loopback interface profile. Because the system automatically recreates this profile immediately, Ansible incorrectly reported a `changed` state. This bug fix adds the loopback device to the role-internal `black_list_names` variable. As a result, the `network` RHEL system role ignores the loopback interface. This prevents unnecessary changes and the role reports an `ok` state.
      Show
      The `network` RHEL system role no longer reports an incorrect state when removing profiles + Before this release, when you used the `network` RHEL system role with the `persistent_state: absent` setting to remove undefined profiles, the role attempted to delete the loopback interface profile. Because the system automatically recreates this profile immediately, Ansible incorrectly reported a `changed` state. This bug fix adds the loopback device to the role-internal `black_list_names` variable. As a result, the `network` RHEL system role ignores the loopback interface. This prevents unnecessary changes and the role reports an `ok` state.
    • Done
    • Done
    • Done
    • Not Required
    • None

      Enhancement: This PR adds the `loopback` device to `black_list_names` when deleting all profiles except the ones explicitly included in the ansible playbook

      Reason: Adding an entry without a name and `persistent_state: absent` to the `network_connections` variables would trigger a `changed` state in one of the tasks

      ```
      TASK [network : Configure networking connection profiles] **********************
      changed: [hostname]
      ```

      This was because the profile `loopback` device was being removed and then automatically recreated by the system.

      Result: Now the loopback profile is kept and the state is not reported as `changed`:

      ```
      TASK [network : Configure networking connection profiles] **********************
      ok: [hostname]
      ```

      Issue Tracker Tickets (GitHub issue): #689

        1. Summary by Sourcery

      Keep the loopback network profile from being deleted when purging absent profiles to prevent false-positive changes in Ansible playbooks

      Bug Fixes:

      • Prevent Ansible from reporting a changed state by avoiding removal and automatic recreation of the loopback profile

      Enhancements:

      • Add "lo" (loopback) to the blacklist when deleting all non-explicit network profiles

              rmeggins@redhat.com Richard Megginson
              rmeggins@redhat.com Richard Megginson
              Richard Megginson Richard Megginson
              David Jez David Jez
              Marc Muehlfeld Marc Muehlfeld
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated: