Unapplying a remediation

You can unapply a remediation that was previously applied to roll back a change when you need to revert it.

Important

The Compliance Operator does not automatically resolve dependency issues that can occur between remediations. Users should perform a rescan after remediations are applied to ensure accurate results.

Procedure
  1. Set the apply flag to false:

    $ oc -n openshift-compliance \
    patch complianceremediations/rhcos4-moderate-worker-sysctl-net-ipv4-conf-all-accept-redirects \
    --patch '{"spec":{"apply":false}}' --type=merge
  2. Verify that the remediation status has changed to NotApplied and the composite MachineConfig object is re-rendered to not include the remediation.

    Important

    All affected nodes with the remediation will be rebooted.