Chapter 4. Executing remediation playbooks
After you create a remediation playbook, you can download and run the playbook using your organization’s Ansible workflow, or execute the playbook on remote systems from the Insights for Red Hat Enterprise Linux application.
4.1. Executing remediation playbooks from the Insights User Interface
You can execute remediation playbooks directly from the Red Hat Insights UI on the Red Hat Hybrid Cloud Console. You must complete four prerequisites before you can do so. Detailed instructions for completing the prerequisites follow the main procedure.
Prerequisites
- You must be logged in to the Red Hat Hybrid Cloud Console.
- You must enable the Remote Host Configuration client (rhc connect) in the command line.
- You must enable Remote Host Configuration Manager in the UI.
- You must be a member of a User Access group with the Remediations administrator role.
The Remediations administrator role is NOT a default role. You must create the group and add yourself to the group. For more information about User Access permissions, see the following: Managing group access with roles and members
Procedure
- Navigate to Automation Toolkit > Remediations.
- Select a remediation playbook by clicking the playbook name.
- Click Execute playbook.
- On the popup menu, click Execute playbook on systems. The playbook runs on those systems.
If Execute playbook is disabled, you need to satisfy the prerequisites listed above to use this feature. Alternately, you can hover your cursor over Execute playbook and you will see the Remediations Readiness Check tooltip. The tooltip identifies prerequisites that are not complete. Click the incomplete prerequisite and follow the link for further instructions or you can see the detailed procedures below.
Additional resources
User Access Configuration Guide for Role-based Access Control (RBAC)
4.1.1. Enabling Remote Host Configuration client (RHC connect) in the command line
You must run RHC client (rhc connect) in the command line to enable host communication. Follow this procedure to learn if your host is connected:
Procedure
- Navigate to Automation Toolkit > Remediations.
- Choose the remediation playbook you want to run.
- Click on the Systems tab and view the Connection Status to the right of your remediation.
If your Connection Status is Unknown, this means you do not have the correct User Access permissions to view the status. Click the ? icon to the left to learn how to change User Access permissions to view this data.
Additional Resources
For more information on the rhc connect command, see the following: Enabling the rhc client on systems directly managed by Insights
4.1.2. Enabling Remote Host Configuration Manager in the UI
You must enable Remote Host Configuration Manager in the UI to execute remediation playbooks. Complete the following steps:
Procedure
- Navigate to Remote Host Configuration Manager.
- Locate the Permission section on the left, look at the first option, Allow Insights users to use Remediations to send Ansible Playbooks to fix issues on your systems.
- If Disabled is selected, click Change settings on the left side of your screen.
- Change the Status toggle to Enabled.
- Click Save changes on the left side of your screen.
- A Changes saved confirmation box will appear at the top right corner of your screen.
4.2. Executing remediations from the Satellite User Interface
You can also remediate using the Satellite User Interface.
Prerequisites
- You are a Cloud Administrator.
- You are a Remediations Administrator.
- You have completed Host registration using the Insights client.
For specific instructions, see Creating an Insights Remediation Plan for Hosts in the Satellite Managing Hosts documentation.
When you introduce a new host into your Satellite inventory, by means of provisioning or registration, two automatic background tasks will initiate. It will take 24 hours for these tasks to complete. This is a typical time frame for the automatic synchronization.
If you identify security issues or another scenario that warrants not waiting 24 hours for the automatic sync, you can manually synchronize by clicking the sync button in the UI. This manual sync will complete in a few minutes.
To see the procedures for enabling automatic and manual synchronization, see the Configuring Synchronization of Insights Recommendations for Hosts in the Satellite documentation.