Demystifying Ansible Automation Platform

Book description

Explore Ansible Automation Platform and understand how the different pieces interact to standardize and scale automation

Key Features

  • Curated by a senior consultant at Red Hat with real-world examples to maximize use of Ansible Automation Platform
  • Use roles and modules to create interactive playbooks in Ansible Automation Platform
  • Discover best practices for simplifying management of Ansible Automation Platform

Book Description

While you can use any automation software to simplify task automation, scaling automation to suit your growing business needs becomes difficult using only a command-line tool. Ansible Automation Platform standardizes how automation is deployed, initiated, delegated, and audited, and this comprehensive guide shows you how you can simplify and scale its management.

The book starts by taking you through the ways to get Ansible Automation Platform installed, their pros and cons, and the initial configuration. You'll learn about each object in the platform, how it interacts with other objects, as well as best practices for defining and managing objects to save time. You'll see how to maintain the created pieces with infrastructure as code. As you advance, you'll monitor workflows with CI/CD playbooks and understand how Ansible Automation Platform integrates with many other services such as GitLab and GitHub.

By the end of this book, you'll have worked through real-world examples to make the most of the platform while learning how to manipulate, manage, and deploy any playbook to Ansible Automation Platform.

What you will learn

  • Get the hang of different parts of Ansible Automation Platform and their maintenance
  • Back up and restore an installation of Ansible Automation Platform
  • Launch and configure basic and advanced workflows and jobs
  • Create your own execution environment using CI/CD pipelines
  • Interact with Git, Red Hat Authentication Server, and logging services
  • Integrate the Automation controller with services catalog
  • Use Automation Mesh to scale Automation Controller

Who this book is for

This book is for IT administrators, DevOps engineers, cloud engineers, and automation engineers seeking to understand and maintain the controller part of Ansible Automation Platform. If you have basic knowledge of Ansible, can set up a virtual machine, or have OpenShift experience, and want to know more about scaling Ansible, this book is for you.

Table of contents

  1. Demystifying Ansible Automation Platform
  2. Contributors
  3. About the author
  4. About the reviewer
  5. Preface
    1. Who this book is for
    2. What this book covers
    3. To get the most out of this book
    4. Download the example code files
    5. Download the color images
    6. Conventions used
    7. Current published book version information
    8. Get in touch
    9. Share your thoughts
  6. Part 1: Getting Ansible Automation Platform Up and Running
  7. Chapter 1: Introduction to Ansible Automation Platform
    1. Technical requirements
    2. AAP overview
      1. Automation controller (Red Hat Ansible Tower)
      2. Automation execution environments
      3. Automation hub
      4. Automation services catalog
      5. Red Hat Insights for Red Hat AAP
      6. Ansible content tools
    3. Key differences between upstream and official Red Hat products
    4. Overview of the methods that will be used in this book
      1. Introduction to the roles and modules that will be used in this book
      2. The manual approach
      3. Using Ansible to manage the configuration
      4. Execution environments and Ansible Navigator
    5. Summary
  8. Chapter 2: Installing Ansible Automation Platform
    1. Technical requirements
      1. Getting a trial version of Ansible Automation Platform
    2. Planning an installation on a machine
      1. The distinct types of nodes
      2. High availability
      3. Installation methods
      4. Setting variables for the automation mesh and node types
    3. Installing Galaxy NG on a machine
    4. Backing up and restoring the installation
      1. Backing up
      2. Secret key redistribution
      3. Restore
    5. Issues that can arise when using the installer
    6. Summary
  9. Chapter 3: Installing Ansible Automation Platform on OpenShift
    1. Technical requirements
    2. Installing AWX on minikube
    3. Installing CodeReady Containers
    4. Installing the Red Hat Ansible Automation Platform operator on an OpenShift cluster
      1. Exploring the Automation controller and Automation hub on OpenShift
      2. Learning about Automation controller specifics on OpenShift
      3. Secret fields
      4. Learning Automation hub specifics
      5. Backing up and restoring a backup for Automation hub and the Automation controller on OpenShift
    5. Summary
  10. Chapter 4: Configuring Settings and Authentication
    1. Technical requirements
      1. Getting a trial version of Ansible Automation Platform
    2. Configuring Automation controller settings
      1. Registering the Automation controller with a subscription manifest
      2. Updating Automation controller settings
    3. Configuring the RH-SSO server SAML
      1. Getting values from a Windows AD server
      2. Configuring the RH-SSO server
      3. Setting Automation hub administrators with RH-SSO
      4. Integrating the Automation controller with RH-SSO
      5. Troubleshooting the SAML configuration
    4. Integrating LDAP with Microsoft AD
      1. Automation controller LDAP bind and user variables
      2. Automation controller LDAP group variables
      3. Automation controller LDAP miscellaneous variables
      4. Troubleshooting
      5. Setting up other authentication methods
    5. Adding users and teams to the Automation controller without an IdP
    6. Adding users and groups to the Automation hub without an IdP
    7. Summary
  11. Part 2: Configuring AAP
  12. Chapter 5: Configuring the Basics after Installation
    1. Technical requirements
    2. Dashboard introduction
    3. Creating organizations – the root of all objects in the controller
      1. Creating an organization using the GUI
      2. Creating an organization using modules
      3. Creating an organization using roles
    4. Using credential types and credentials
      1. Credential types
      2. Credentials
      3. The creation of credential types and credentials using various methods
    5. Importing and exporting objects into the controller
    6. Summary
  13. Chapter 6: Configuring Role-Based Access Control
    1. Technical requirements
    2. Assigning RBAC to the Automation controller
      1. Approval permissions for workflows
      2. Practically using the RBACs
    3. Assigning RBAC to the Automation hub
      1. Setting roles in the GUI
      2. Practically using the RBACs
    4. Summary
  14. Chapter 7: Creating Inventory, and Other Inventory Pieces
    1. Technical requirements
    2. Creating an inventory
      1. Creating and populating an inventory using the GUI
      2. Creating and populating an inventory with modules
      3. Creating and populating an inventory with roles
    3. Using inventory sources
      1. Creating and synchronizing an inventory source with the GUI
      2. Creating and populating an inventory source with modules
      3. Creating and populating an inventory source with roles
    4. Using base Ansible inventory plugins
      1. Pre-installed Ansible plugins
    5. Using built-in Automation controller inventory plugins
      1. AWS EC2
      2. GCE
      3. Microsoft ARM
      4. VMware vCenter
      5. Red Hat Satellite 6
      6. Red Hat Insights
      7. OpenStack
      8. RHV
      9. Red Hat Ansible Automation Platform
    6. Using other popular inventory plugins
      1. Overview of using custom inventory plugins
      2. NetBox
      3. ServiceNow
    7. Writing your own inventory plugin
      1. Ansible configuration changes
      2. Custom inventory plugin script
    8. Summary
    9. Further reading
  15. Chapter 8: Creating Execution Environments
    1. Technical requirements
    2. What are execution environments?
      1. What is inside the execution environment?
      2. Seeing what is in a specific execution environment
    3. How to use execution environments
      1. Running a simple job in an execution environment
    4. Creating and modifying your execution environments
      1. Creating a definition file
      2. Creating the execution environment
    5. Using roles to create execution environments
      1. Creating an execution environment using the builder role
      2. Converting Python virtual environments from older Tower installations
    6. Summary
  16. Chapter 9: Automation Hub Management
    1. Technical requirements
    2. Overview of Automation hub and its content sources
    3. Synchronizing certified and community collections
    4. Publishing custom collections
    5. Managing execution environments and registries
      1. How to add a remote EE registry
      2. How to synchronize an EE registry
      3. How to add a remote or local EE to Automation hub
      4. Best practices for maintaining execution environments
    6. Connecting Automation hub to the Automation controller
      1. Using credentials to pull collections
      2. Adding execution environments to the Automation controller with the GUI
      3. Adding execution environments to the Automation controller with modules
      4. Adding execution environments to the Automation controller with roles
    7. Summary
  17. Chapter 10: Creating Job Templates and Workflows
    1. Technical requirements
    2. Creating projects
      1. The structure and files of a playbook directory
      2. Project options on the Automation controller and creating projects in the GUI
      3. Creating projects on the Automation controller using modules
      4. Creating projects on the Automation controller using roles
    3. Creating job templates
      1. Job template options for the GUI, modules, and roles
      2. Creating job templates using the GUI
      3. Creating job templates using modules
      4. Creating job templates using roles
    4. Surveys for job templates and workflows, and how to use them
      1. Survey definitions
      2. Using surveys
    5. Creating workflows
      1. Workflow basics
      2. Workflow job template options for the GUI, modules, and roles
      3. Workflow node list options and creation in the GUI
      4. Creating workflows using roles
    6. Using job slicing to slice a job template into multiple jobs
    7. Summary
  18. Part 3: Extending Ansible Tower
  19. Chapter 11: Creating Advanced Workflows and Jobs
    1. Technical requirements
    2. Creating advanced workflows
      1. Using workflow artifacts and variables
      2. Creating nodes for user review
      3. Using workflow approval nodes
      4. Marking a workflow as failed or successful
    3. Using and configuring notifications
      1. Understanding the basics of notifications
      2. Notification options for the GUI, modules, and roles
      3. Creating a notification template using modules
      4. Creating a notification template using roles
      5. Adding notifications to activities
    4. Summary
  20. Chapter 12: Using CI/CD to Interact with Automation Controller
    1. Technical requirements
    2. A brief introduction to CI/CD pipelines and webhooks
    3. Maintaining an Automation controller and hub through infrastructure as code paired with CI/CD
    4. Launching jobs, monitoring, and interacting with workflows using CI/CD playbooks
    5. Ad hoc commands
    6. Backup and restore options using CI/CD playbook
    7. Summary
    8. Further reading
  21. Chapter 13: Integration with Other Services
    1. Technical requirements
    2. Logging services
      1. Creating an event collector on Splunk
      2. Connecting the Automation controller to Splunk
      3. Troubleshooting with the log aggregator
      4. Splunk search queries
      5. Splunk dashboards
    3. Automation Analytics for Red Hat AAP
      1. Automation Analytics configuration
      2. Configuring the insights settings with roles/modules
      3. Charts and other information accessible from the dashboard
      4. Automation calculator
    4. Prometheus metrics logging
      1. Installation and configuration
      2. Prometheus Graphs
    5. Summary
  22. Chapter 14: Automating at Scale with Automation Mesh
    1. Technical requirements
    2. Overview of Automation mesh
      1. The distinct types of nodes
    3. Using instance groups with Automation mesh
      1. Creating instance groups
    4. Examples of various use cases and how to use Automation mesh
      1. Global Automation mesh example
    5. Summary
  23. Chapter 15: Using Automation Services Catalog
    1. Technical requirements
    2. What is Automation services catalog?
    3. Configuring the ASC
      1. Configuring the SSO for access to the ASC
    4. Approvals inside ASC
    5. Summary
    6. Afterword
  24. Index
    1. Why subscribe?
  25. Other Books You May Enjoy
    1. Packt is searching for authors like you
    2. Share your thoughts

Product information

  • Title: Demystifying Ansible Automation Platform
  • Author(s): Sean Sullivan
  • Release date: September 2022
  • Publisher(s): Packt Publishing
  • ISBN: 9781803244884