This Ansible playbook automates the provisioning of organizations and teams in Ansible Automation Platform (AAP). It generates configuration files from templates, appends data to tracking files, and applies configurations using predefined roles.
This is meant to be a templated and can be adapted to your environment as you see fit.
- Ansible installed
- Required environment variables:
AAP_HOSTNAME
AAP_VALIDATE_CERTS
(optional, defaults tofalse
)AAP_USERNAME
AAP_PASSWORD
- Organization variables must be defined:
org_name
org_full_name
org_description
- Collections Requirements
---
collections:
# VALIDATED RED HAT CONTENT
- name: ansible.platform
- name: ansible.hub
- name: ansible.controller
- name: ansible.eda
- name: infra.aap_configuration
Run the playbook with:
ansible-playbook aap_org_team_provisioning.yml -e "org_name=my_org org_full_name='My Organization' org_description='Description here'"
├── aap_org_team_provisioning.yml # Playbook file
├── templates/
│ ├── organization.yml.j2 # Organization template
│ ├── team.yml.j2 # Team template
├── data/
│ ├── aap_organizations.yml # Organization data file
│ ├── aap_teams.yml # Team data file