合规性即代码
本文档提供了有关使用 Ansible 剧本运行合规性即代码修复的深入信息。
有关使用 bash 脚本运行合规性即代码修复的详细信息,请参见修复。
要执行修复,您需要在 Ansible 控制节点上安装 SCAP 安全指南软件包。
-
在中选择客户端。然后单击。
-
Search for
scap-security-guideand install the package suitable for your system. See the following table for package distribution requirements:Table 1. SCAP 安全指南软件包要求 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 12
scap-security-guide-ubuntu
Ubuntu 22.04
1. 使用 Ansible 剧本进行修复
需要一个 Ansible 控制节点。有关详细信息,请参见 设置 Ansible 控制节点。
以下过程将介绍如何使用 Ansible 剧本运行修复任务。
-
在控制节点系统菜单中选择 ,然后单击某个剧本,例如:
sle15-playbook-stig.yml -
To run the playbook, select the
Inventory Pathfor the clients, for example:/etc/ansible/sles15单击 日程安排。
-
Check the status of the scheduled event under the
Eventstab.
In case playbooks are in a different directory, you can follow the link to Setup Ansible Control Node to find out how to add it.