Deploy mesh project

This project is a work-in-progress and is created to manage your automation mesh, from installation to change and decommission. Even recovery should be handled automaticly.

This is a rather large mission statement, but we will create this in small steps.

The project in GIT

This project is a all-in-one git project, it has the code and inventory in the same project.

.
├── README.md
├── inventory.yml
├── main.yml
├── group_vars
│   ├── all.yml
│   └── ig_lnx1.yml
├── hos_vars
│   ├── en01.dev.lab.yml
│   └── en02.dev.lab.yml
└── collections
    └── requirements.yml

We will go over the individdual directories/files to show the content and settings: - collections/requirements.yml - inventory.yml - group_vars - host_vars - main.yml

colections/requirements.yml

The list of collections used in this project are:

---

collections:
  - wf_linux.vault
  - ansible.controller
  - community.general
  - ansible.posix

The wf_linux.vault collection is my interpretation of the roles needed to interface with my secrets vault, replace this with your own vaulting solution.

inventory.yml

The inventory used for the definition of the execution mesh for rhaap.

all:
  children:
    ig_lnx1:
      hosts:
        en01.dev.lab:
            instance_group_name: ig_lnx1
        en02.dev.lab:
            instance_group_name: ig_lnx1

We defined 1 instance group and there are 2 execution nodes in this group.

group_vars

In the group_vars we collect the various variables for the execution nodes:

all.yml

The global vars used for all execution nodes in the inventory:

---
ansible-repository: ansible-automation-platform-2.6-for-rhel-9-x86_64-rpms
deploy_workflow: Deployment workflow
deploy_organization: ORG_WFL

The vars defined here are: | Name | Value | Description | |---|---|---| | ansible-repository | ansible-automation-platform-2.6-for-rhel-9-x86_64-rpms | The RedHat repository for ansible packages | | deploy_workflow | Deployment workflow | The name of the job_template to deploy machines in your environment | | deploy_organization | The organization the deployment workflow resides in controller |

ig_lnx1.yml

These are the variables that will be applied to the execution node installation as the settings for each node in the group.

---
instance_group_name: ig_lnx1
concurrent_jobs: 20
forks: 200
policy_instance_percentage: 0
policy_instance_minimum: 0
branch_name: dev
org_name: base

host_vars

The host specific variables to be applied to the separate nodes.

en01.dev.lab.yml

host_name: en01.dev.lab
node_type: execution
listener_port: 27199
peers_from_control_nodes: true

en02.dev.lab.yml

host_name: en02.dev.lab
node_type: execution
listener_port: 27199
peers_from_control_nodes: true

As you can see, there are no host definition variables in this inventory, like ip addresses and memory or disk sizes,
this must be defined in the inventory the deployment workflow uses and keeeps the definition files small.
As such, the standard deployment inventory has a complete overview of all host for other tasks, like patching.

In this first itteration, we just define 2 execution nodes in one instance group to keep things simple. In a later stage, we will add hop nodes, more groups ect.

main.yml

The core of this project is the playbook.
As it will grow with functionalty, we have placed this on a separate page.

main.yml

Back

Rhaap_26