Skip to content

This is an Ansible project for automating system tasks for dev, test and prod environments. This is for in DevOps and MLOps Environments

Notifications You must be signed in to change notification settings

blessing-bester/Ansible-Automation-Collection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

37 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌐 Ansible Infrastructure Automation Project

Ansible License Status Platform


Overview

This repository automates the setup and configuration of Development, Testing, and Production environments using Ansible.

The goal is to standardize and simplify infrastructure provisioning and configuration from a single control node, ensuring consistency, repeatability, and scalability across all environments.


βš™οΈ Prerequisites

Before running any playbooks, ensure you have:

  • A control node (Ubuntu, RHEL, Fedora, CentOS, etc.)
  • Target nodes reachable via SSH
  • Python 3.10+
  • Ansible 2.15+

Installing Ansible on the Control Node

I have provided a script to install ansible with comments as instruction .

Verify Connection to Managed Nodes Ensure your inventory file (for example inventory/servers.ini) is correctly configured:

[devservers]

ipaddress, hostname, ssh_remote_user, ssh_passwd

[testservers]

ipaddress, hostname, ssh_remote_user, ssh_passwd

[prodservers]

ipaddress, hostname, ssh_remote_user, ssh_passwd

ansible all -m ping -i inventory/servers.ini

Expected output: ip_address | SUCCESS => { "changed": false, "ping": "pong" }

How to Use This Repository

1️⃣ Clone the Repository bash git clone https://github.com/blessin-bester/Ansible-Automation-Collection.git

cd Ansible-Automation-Collection

2️⃣ Update Inventories with your setups and Ip_addresses and Variables Modify inventory/ and group_vars/ files to match your environment.

3️⃣ Run Playbooks Run the Development setup:

πŸ” Using Ansible Vault (Optional) If your environment includes sensitive data such as passwords, keys, or tokens, use Ansible Vault to encrypt them.

Create an encrypted variable file: bash ansible-vault create group_vars/prod.yml

Run a playbook using a vault password: bash ansible-playbook -i inventory/prod.ini playbooks/prod.yml --ask-vault-pass

GitHub Actions Integration (CI/CD)

This repository includes a GitHub Actions workflow under .github/workflows/ansible-ci.yml.

What It Does:

Lints playbooks and YAML files using ansible-lint, Molecule and yamllint

Runs automatically on every push or pull request

Ensures consistent and clean code across environments

πŸ‘₯ Contributing

Contributions are welcome! Please read CONTRIBUTING.md for contribution guidelines.

You can contribute by:

  1. Adding new roles
  2. Improving playbooks

Extending support to more OS or cloud environments

πŸ“ License This project is licensed under the MIT License. See the LICENSE file for details.

πŸ’‘ Author Blessing Phiri DevOps / OpenShift / Platform Engineer πŸ”— GitHub Profile


About

This is an Ansible project for automating system tasks for dev, test and prod environments. This is for in DevOps and MLOps Environments

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages