Remediate issues that are reported by Red Hat Insights by using automation controller from Red Hat Ansible Automation Platform.
Integrating automation controller with Red Hat Insights enables you to automate Insights remediation for a group of registered systems.
In automation controller, you can create a Source Control Manager (SCM) project that uses Insights as the SCM for the project's Ansible Playbooks.
You must create a credential in automation controller of the Insights type to store the username and password for your Red Hat Insights account, and then configure your project to use that credential for authentication.
One of the advantages of this configuration is that users can run maintenance plan Ansible Playbooks from automation controller without having direct access to the credentials for the Red Hat Insights account. The credentials are stored in automation controller, and you can use automation controller's permissions system to protect them from being read directly.
The Insights credential stores the username and password that are used to log in to the Red Hat Insights interface in the Customer Portal. The Insights project in automation controller uses the Insights credential to download the Ansible Playbooks that are created by using the Insights planner, and to list the Insights actions that are associated with a registered system.
In the automation controller web UI, use the following steps to create an Insights credential:
Navigate to → and click .
Specify a name for the credential and optionally enter a description.
Select Insights from the list.
Use a valid Red Hat Customer Portal account username and password for the credentials.
Click .
Automation controller projects support a special SCM repository type specifically for Red Hat Insights. Upon selecting the Insights source control, the project retrieves its Ansible Playbooks directly from the maintenance plans that you created in Insights.
In the automation controller web UI, use the following steps to create an Insights project:
Navigate to → and click .
Specify a name for the project and optionally enter a description.
Select Red Hat Insights from the list.
In the search field, select the Insights credential that you previously created.
Click .
The Ansible Playbooks that are created by Insights specify hosts by name for each play. The hostnames in the inventory that is used by automation controller must match the names that are used for registered systems in the Red Hat Insights Customer Portal. You can manually add the hosts in the inventory, or retrieve them as dynamic inventory from Insights.
In the automation controller web UI, use the following steps to create an inventory:
Navigate to → .
Click , and select the Add inventory type.
Specify a name for the inventory.
Click .
After creating the inventory, use the following steps to add the host manually:
Click the tab.
Click .
Specify the name for the host.
Click .
Alternatively, you can create an Insights inventory source to dynamically generate a list of hosts that are registered in Insights. After creating the inventory, use the following steps to add the host dynamically:
Click the tab.
Click .
Specify the name for the inventory source.
Select Red Hat Insights from the list.
For the field under , use the Red Hat Insights credential that you previously created.
Click .
To enable automation controller to use the Ansible Playbooks from Insights maintenance plans in a job template, the playbooks must be imported from your Insights account into your project in automation controller.
In the automation controller web UI, use the following steps to create a job template:
Navigate to → .
Click , and select Add job template from the list.
Specify the name for the job template.
In the list, select Run to execute the job template when it launches.
In the search field, select the My Insights Inventory inventory.
In the field, select the My Insights Project project.
In the list, select the Ansible Playbook that is associated with the maintenance plan that you want to run.
In the search field, select the credentials to authenticate the automation controller.
Click .
To run the job template, click to run the Ansible Playbook.
Alternatively, you can run the job template by navigating to → , and then clicking the launch icon (the icon).
Automation controller shows the result of the playbook execution. To find the results of the executed jobs, navigate to from the navigation bar.
For more information about Red Hat Insights remediations, refer to the Settting up Insights Remediations section of the Automation Controller User Guide at https://docs.ansible.com/automation-controller/latest/html/userguide/insights.html