Ansible Automation Platform Overview
Ansible Automation Platform, otherwise known as AAP2, is Red Hat's new licensed architecture that provides an automation framework built to scale and withstand enterprise level development and deployment. In this new architecture, there are new terms and components that maintain and enhance the same automation power of Ansible that users are used to.
In this new architecture referred to as AAP2, your automation controller will replace Ansible Tower, and your Ansible and Python dependencies will be managed through automation execution environments which are containers that provide a reliable, reproducible execution layer. Finally, the Automation Hub will provide a place for AAP2 customers to quickly find, use, and extend content that is supported by Red Hat and its technology partners. For more information on the Ansible Automation Platform please refer to Ansible's documentation.
Ansible Automation Platform Overview provided by Red Hat:
Ansible Automation Platform & AOS-CX
You can use the AOS-CX Ansible collection within your Ansible controller by utilizing HPE Aruba Networking's AOS-CX Ansible Execution Environment and through defining the collection dependency within your project. You can also find the latest supported version within Ansible's Automation Hub.
Defining the AOS-CX Collection Dependency
It's recommended to store your playbooks in a Source Code Management system like Git - this way it's easier track changes and ensure consistency between runs. We have an example of what a potential projects repository can look like in our aoscx-ansible-workflows repository. In that repo you'll notice a directory labeled collections/
with a requirements.yml
file. This file is what your automation controller will use to install any Ansible collection dependencies at run time. To execute playbooks using the AOS-CX Ansible Collection your collections/requirements.yml
file should include the following:
collections:
- arubanetworks.aoscx
Utilizing the AOS-CX Ansible Execution Environment
Ansible execution environments should contain all the Python dependencies required by the Ansible collections you're using. For AOS-CX automation through your Ansible automation controller, we've provided an image for you that includes all the required packages to use with the AOS-CX Collection. It's important to note that you can only use one execution environment per template, so if you're using multiple collections each with their own Python requirements, you may want to consider building your own custom execution environment.
To utilize the AOS-CX Ansible execution environment, select Execution Environments from the left side panel and select Add to create a new execution environment, then enter docker.io/arubahpe/ansible-aoscx-ee:latest as the image name. An example of this can be seen below.
Image can be seen here.
Use the aoscx-ansible-workflows project in the automation controller
After creating an execution environment you're ready to use the AOS-CX Collection in your automation controller. We've provided sample workflows for you to use in our aoscx-ansible-workflows repository that can easily be integrated into your automation controller. Select Projects from the left side panel then Add to create a new project Then select/enter the following details for each field:
- You'll specify the execution environment you created with the AOS-CX Python requirements (either using HPE Aruba Networking's or building your own)
- Select Git as the Source Control Type
- Provide the HTTPS address of the git repository
https://github.com/aruba/aoscx-ansible-workflows.git
as the Source Control URL
Your fields should look similar to the following:
Then once you've selected Save you should see the value of "Successful" in the "Last Job Status" similar to the following screen shot:
Now you're ready to utilize any of the provided example playbooks, simply select Templates from the left panel, select Add/Add Job Template , and once you've selected the recently created Project, you'll see the option to select one of the many example playbooks in the Playbook field!
Stay tuned for upcoming videos on Ansible automation controller and AOS-CX interoperability!
Updated about 2 months ago