Chapter 3. Running a Playbook

3.1. Running Ansible Playbooks in Insights

After you create a maintenance plan in the Insights UI, run the plan as a playbook from the command line.

Note

As of the current release, playbooks are available for most—​but not all—​rule vulnerabilities. Maintenance plans that include rules for which there is no playbook will show the Download Playbook button grayed out. For playbook integration, look for the blue Ansible icon next to the rule.

3.1.1. Generate an Ansible Playbook from the Insights UI

Ansible Playbooks are generated at the time the maintenance plan is created, or can be generated later, from the maintenance plan list in the Planner tab of the Insights UI.

  1. Navigate to the Planner tab of the Insights UI in the Customer Portal.
  2. Select a plan.
  3. Click Download Playbook, located in the bottom right corner of the plan card.
  4. Save the .yml file in an appropriate directory.

3.1.2. Run an Ansible Playbook

To run an Ansible Playbook, open a terminal and execute

# ansible-playbook <playbook>.yml

3.1.2.1. View Results in Planner

After you run the playbook, go to the the UI Planner and view the issues that have been remediated.

Revised on 2018-09-24 19:10:13 UTC