Compliance as Code
This document provides insight on running compliance as code remediation using an Ansible Playbook.
For more infomation about running compliance as code remediation using a bash script, see Remediation.
1. Install the SCAP security guide package
For executing remediations you need to install the SCAP security guide package on the Ansible control node.
-
From
, select the client. Then click . -
Search for
scap-security-guide
and install the package suitable for your system. See the following table for package distribution requirements:Table 1. SCAP security guide package requirements Package name Supported Systems scap-security-guide
openSUSE, SLES12, SLES15
scap-security-guide-redhat
CentOS 7, CentOS 8, Fedora, Oracle Linux 7, Oracle Linux 8, RHEL7, RHEL8, RHEL9, Red Hat OpenStack Platform 10, Red Hat OpenStack Platform 13, Red Hat Virtualization 4, Scientific Linux
scap-security-guide-debian
Debian 11, Debian 12
scap-security-guide-ubuntu
Ubuntu 20.04, Ubuntu 22.04
2. Remediation Using an Ansible Playbook
An Ansible control node is required. For more information, see Setup Ansible Control Node.
The following procedure will guide you through running remediation using an Ansible Playbook.
-
From the control node system menu select
. Expand the folder tab, then select a playbook. -
Click the playbook.
-
To run the playbook, select the OS Inventory Path for the client, for example:
/etc/ansible/sles15
-
Click Schedule.
-
Check the status of the scheduled event under the
Events
tab.