Configuration-as-code for Red Hat Ansible Automation Platform 2.5 with validated collections
Welcome to our interactive lab on using Configuration as Code to configure the Ansible Automation Platform Configuration as Code (CasC) is the way to maintain all your infrastructure. This lab will provide code to demonstrate how to use CasC to maintain all aspects of AAP. The provided code will be a starting point, and will guide you through how to utilize the code, and make it your own. This lab will cover configuring controller, private automation hub, execution environments, as well as the creation of workflows without the GUI as an example to follow along. These principles will help to prevent drift in configuration, allow changes to require approval before implementation, and help to maintain both a development and prod deployment.
What is Configuration as Code (CasC)?
Configuration as Code (CasC) is a software development practice that treats infrastructure configurations as code. This approach allows you to version control, track changes, and automate the deployment of your infrastructure configurations. With CasC, your configuration files or scripts serve as the single source of truth for your infrastructure setup. Any changes should be made through this mechanism, avoiding direct changes in the Ansible Automation Platform (AAP) UI. Benefits of CasC By adopting a Configuration as Code approach, you can enjoy numerous benefits, including:
-
Version Control : Track changes and collaborate with team members.
-
Consistency : Ensure consistent configurations across different environments.
-
Repeatability : Repeat the same configuration setup multiple times.
-
Automated Deployment : Automate deployment to different environments.
-
Auditing and Compliance : Track who made changes, when, and what was changed.
Lab structure
In this lab, we will demonstrate how to use Configuration as Code to configure various aspects of the Ansible Automation Platform (AAP). This includes:
-
First, We will setup the basics for configuring the Automation Platform.
-
Next we will Create some credentials, inventories, and job templates and everything that is needed to create them.
-
Next we will configure the Hub to load in more content.
-
We will then build an execution environment to be used on the platform.
-
Finally for extra credit, a workflow can be created from scratch.
By following this lab, you will learn how to use CasC to maintain a consistent and repeatable infrastructure configuration across different environments. This approach will help prevent drift in configuration, require approval before implementation, and ensure that both development and production deployments are well-maintained.