合规性即代码

本文档提供了有关使用 Ansible 剧本运行合规性即代码修复的深入信息。

有关使用 bash 脚本运行合规性即代码修复的详细信息,请参见修复

要执行修复,您需要在 Ansible 控制节点上安装 SCAP 安全指南软件包。

过程:安装 SCAP 安全指南软件包
  1. 系统  概览中选择客户端。然后单击软件  软件包  安装

  2. Search for scap-security-guide and 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 剧本运行修复任务。

过程:使用 Ansible 剧本运行修复
  1. 在控制节点系统菜单中选择 Ansible  剧本,然后单击某个剧本,例如:

    sle15-playbook-stig.yml
  2. To run the playbook, select the Inventory Path for the clients, for example:

    /etc/ansible/sles15

    单击 日程安排

  3. Check the status of the scheduled event under the Events tab.

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.