Skip to content

r3dact3d/Ansible-Automation-Platform-CaC

Repository files navigation

AnsibleProject

Organize Your Repository

Setup dedicated repository for your ansible projects, which includes playbooks, roles, and inventories. You might want to have a structure like this:

Directory Structure
.
├── .github/workflows
├── collections
│   └── requirements.txt
├── controller_configs
│   ├── all
│   ├── controller
│   ├── pah
│   └── eda
├── inventory.yml
└── controller_config.yml

This allows you to separate controller configurations for different environment life-cycles.

Ansible Automation Platform

This is just the specs for my lab and really the minimum requirements to highlight Ansible Controller as Code.

Workflow

This repo currently offers a playbook that will configure Ansible controllers based on variables defined in group_vars and/or configs directory.

There are two parts:

  1. Seed the required objects to support Controller as Code

    1. Located in the configs/directory are the configs to configure credential, project, and template to keep Controller as Code in sync

  2. Continuous configuration as code

    1. Keeps Ansible controllers in sync with code via template webhook

Before Seeding Controller as Code:

  1. Ensure inventory.yml has YOUR Ansible Controller host(s) defined

  2. Create a GitHub repository secret that is passed during workflow

    1. CONTROLLER_PASSWORD = secret should be the Admin password used to login to the controller GUI

    2. TOKEN = RH API Token

GitHubRepoSecrets
badge
Note
You can now check the Actions to watch/check the status of the deployment.

Completing the sync webhook

  1. Manual task currently to get webhook url and token from the Job Template in the controller UI

Function

This will create admin credential, and a project with template to get stats from the controller. To highlight the syncing ability from Git to Controller.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages