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

[Epic]: fix: tempdir path not defined in check mode; __selinux_item.path may be undefined

Linking RHIVOS CVEs to...Migration: Automation ...SWIFT: POC ConversionSync from "Extern...XMLWordPrintable

    • [Epic]: fix: tempdir path not defined in check mode; __selinux_item.path may be undefined
    • Low
    • Red Hat Enterprise Linux
    • 0% To Do, 0% In Progress, 100% Done
    • rhel-system-roles
    • False
    • Hide

      None

      Show
      None
    • Yes
    • Dev ack

      Cause: tempdir path is not defined in check mode, and __selinux_item.path may be undefined
      in some cases.

      Consequence: The role will give an error when running in check mode that various
      variables are undefined.

      Fix: Skip tasks that require tempdir.path to be defined. Handle cases where variables
      may be undefined.

      Result: The role works in check mode.

      Signed-off-by: Rich Megginson <rmeggins@redhat.com>

        1. Summary by Sourcery

      Enable Ansible check mode support in selinux_load_module by guarding against undefined tempdir.path and __selinux_item.path.

      Bug Fixes:

      • Guard copy, install, and cleanup tasks against undefined tempdir.path to prevent errors in check mode
      • Provide a default for __selinux_item.path when copying modules to avoid undefined path errors

      Enhancements:

      • Skip filesystem operations requiring tempdir.path when it is not defined to improve check mode compatibility

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

                Created:
                Updated: