Uninstall kea Package

Description

If the system does not need to act as a DHCP server, the kea package can be uninstalled.

Rationale

Removing the DHCP server ensures that it cannot be easily or accidentally reactivated and disrupt network operation.

Remediation

Shell script

The following script can be run on the host to remediate the issue.

#!/bin/bash

# CAUTION: This remediation script will remove kea
# from the system, and may remove any packages
# that depend on kea. Execute this
# remediation AFTER testing on a non-production
# system!


if rpm -q --quiet "kea" ; then
dnf remove -y --noautoremove "kea"
fi

Ansible playbook

The following playbook can be run with Ansible to remediate the issue.

- name: 'Uninstall kea Package: Ensure kea is removed'
  ansible.builtin.package:
    name: kea
    state: absent
  tags:
  - CCE-86596-4
  - disable_strategy
  - low_complexity
  - low_disruption
  - medium_severity
  - no_reboot_needed
  - package_kea_removed