Remediating Configuration Issues Using Red Hat Insights and Ansible Playbooks

Red Hat Insights 1.0

Create playbooks in Insights to run with your Ansible workflow

Red Hat Customer Content Services

Abstract

Create Ansible Playbooks to automate remediation of issues identified by Red Hat Insights
Providing Feedback: If you have a suggestion for improving this documentation, or have found an error, please submit a Bugzilla report at http://bugzilla.redhat.com for the Cloud Software Services (cloud.redhat.com) product, and using the Documentation component.

Chapter 1. Remediation of configuration issues on RHEL systems

Red Hat Insights facilitates the remediation of rules issues on Red Hat Enterprise Linux (RHEL) systems in your infrastructure by providing resolution information for each rule, tailored to each system. You can remediate issues manually or, in most cases, create Ansible Playbooks to automate remediation procedures.

Chapter 2. Viewing remediation actions

Red Hat Insights analyzes your Red Hat Enterprise Linux (RHEL) infrastructure and shows you the actions you can take to remediate issues that can affect your systems.

Procedure

  1. In the Insights console, go to Rules and check the box to Show Rules With Hits.
  2. Click on the name of a rule.
  3. Scroll down to view Affected Hosts to see all systems on which this rule is hitting.
  4. Click on a system and scroll down to see all the issues that are active on that system.
  5. For each issue, view the specific details about that rule + system pairing, a description of how the issue may be manifested on this system, and the steps to resolve the issue.

Chapter 3. Remediating rules on systems manually

Red Hat Insights provides users the steps to remediate issues manually for each rule + system pairing.

Procedure

  1. In the Insights console, go to Rules to select the issue you want to resolve.
  2. Click on the name of the rule.
  3. Scroll down to Affected Hosts to see all systems on which this rule is hitting.
  4. Click on a system and scroll down to see the rules hitting on the system.
  5. For each rule, view the specific details about that rule + system pairing, a description of how the issue can affect the system, and the steps to resolve the issue on the system.
  6. Follow the instructions in Steps to resolve to remediate the issue on the system.

Chapter 4. Creating a playbook to automate remediations

Red Hat Insights enables users to automate rule remediation using Ansible Playbooks.

Note

Look for an Ansible icon, which indicates whether there is a playbook available for that rule + system pairing. A blue icon indicates that a playbook is available. A grey icon with a line through it indicates that a playbook is not available.

Procedure

  1. For an individual system, identify the individual rules hitting on that system.

    • Select an issue from Rules and select from the systems in the Affected Hosts list.
    • Select a system from Inventory and click on the Insights tab to see rules active on that system.
  2. Click Remediate with Ansible to create a playbook for the rule + system pairing.
  3. To add the remediations to an Existing Playbook, select the desired playbook from the dropdown list, or create a New Playbook by providing a Playbook Name and clicking Next.
  4. Verify correct information in the Remediation Summary, toggle Auto Reboot if available and desired, then click Create Playbook.
  5. Locate your playbook in Remediations and download the yaml file.
  6. Add the yaml file to your Ansible workflow.

Chapter 5. Reference materials

To learn more about Red Hat Insights, the following resources might also be of interest:

Legal Notice

Copyright © 2019 Red Hat, Inc.
The text of and illustrations in this document are licensed by Red Hat under a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is available at http://creativecommons.org/licenses/by-sa/3.0/. In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must provide the URL for the original version.
Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law.
Red Hat, Red Hat Enterprise Linux, the Shadowman logo, the Red Hat logo, JBoss, OpenShift, Fedora, the Infinity logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries.
Linux® is the registered trademark of Linus Torvalds in the United States and other countries.
Java® is a registered trademark of Oracle and/or its affiliates.
XFS® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries.
MySQL® is a registered trademark of MySQL AB in the United States, the European Union and other countries.
Node.js® is an official trademark of Joyent. Red Hat is not formally related to or endorsed by the official Joyent Node.js open source or commercial project.
The OpenStack® Word Mark and OpenStack logo are either registered trademarks/service marks or trademarks/service marks of the OpenStack Foundation, in the United States and other countries and are used with the OpenStack Foundation's permission. We are not affiliated with, endorsed or sponsored by the OpenStack Foundation, or the OpenStack community.
All other trademarks are the property of their respective owners.