22.8. Configuring Red Hat Lightspeed remediations by using the rhc RHEL system role
You can use the rhc RHEL system role to configure Red Hat Lightspeed remediations on your systems. When you connect your system to Red Hat Lightspeed, it is enabled by default.
You can use rhc to ensure your system is ready for remediation when connected directly to Red Hat. For more information about Red Hat Lightspeed remediations, see Red Hat Lightspeed Remediations.
Prerequisites
- You have prepared the control node and the managed nodes.
- You are logged in to the control node as a user who can run playbooks on the managed nodes.
-
The account you use to connect to the managed nodes has
sudopermissions for these nodes. - You have Red Hat Lightspeed remediations enabled.
- You have registered the system.
Procedure
Create a playbook file, for example,
~/playbook.yml, with the following content:--- - name: Managing systems with the rhc RHEL system role hosts: managed-node-01.example.com tasks: - name: Disable remediation ansible.builtin.include_role: name: redhat.rhel_system_roles.rhc vars: rhc_insights: remediation: absent state: presentValidate the playbook syntax:
$ ansible-playbook --syntax-check ~/playbook.ymlNote that this command only validates the syntax and does not protect against a wrong but valid configuration.
Run the playbook:
$ ansible-playbook ~/playbook.yml