Configure an existing Red Hat Satellite Server to perform OpenSCAP scans.
Outcomes
Configure an existing Satellite Server to import Ansible roles and variables.
Push OpenSCAP content to the registered host and perform OpenSCAP scans.
As the student user on the workstation machine, use the lab command to prepare your environment for this exercise, and to ensure that all required resources are available.
[student@workstation ~]$ lab start compliance-configuring
Instructions
On the workstation machine, open a web browser and navigate to https://satellite.lab.example.com.
Log in as the admin user with redhat as the password.
Verify that a host group named org-hostgroup1 exists in the Operations organization.
Set Satellite Server to use the Operations organization.
Navigate to and select Operations.
Navigate to → .
Verify that the org-hostgroup1 host group exists.
Click the link to open the group for editing.
Ensure that the following fields are correctly configured:
Table 11.1. Ansible Configuration
| Field | Value |
|---|---|
| Content Source |
satellite.lab.example.com
|
| Lifecycle Environment | Production |
| Content View | RHEL9-Content |
| OpenSCAP Capsule |
satellite.lab.example.com
|
Import the Ansible role and Ansible variables to Satellite Server.
Navigate to → and click .
In the section, select the theforeman.foreman_scap_client role and click .
Navigate to → . Verify that the variables have been imported.
Import the theforeman.foreman_scap_client Ansible role to the org-hostgroup1 host group.
Navigate to → and click .
On the page, select the tab.
Click the plus sign (+) to the right of theforeman.foreman_scap_client role to import the Ansible role.
Then click to import the role.
Upload the default OpenSCAP content to the Satellite Server database.
Log in to the satellite machine as the student user.
Change to the root user.
Use student as the password.
[student@workstation ~]$ssh student@satellite[student@satellite ~]$sudo -i[sudo] password for student:student[root@satellite ~]#
Use the hammer scap-content bulk-upload command to upload the default OpenSCAP content to Satellite Server.
[root@satellite ~]# hammer scap-content bulk-upload --type default
Errors:
Uploaded Scap Contents:
Scap Contents uploaded.Verify that the default OpenSCAP content is uploaded to the Satellite Server database.
Use the hammer scap-content list command to list the OpenSCAP content that is present on the Satellite Server database.
[root@satellite ~]# hammer scap-content list --fields Id,Title
---|--------------------------------
ID | TITLE
---|--------------------------------
1 | Red Hat firefox default content
2 | Red Hat rhel6 default content
3 | Red Hat rhel7 default content
4 | Red Hat rhel8 default content
---|--------------------------------Return to the workstation machine as the student user.
[root@satellite ~]#logout[student@satellite ~]$logoutConnection to satellite closed. [student@workstation ~]$
View the OpenSCAP content from the Satellite Server web UI.
Navigate to → . The page lists the default SCAP content.