Skip to content

mrlesmithjr/Ansible

Ansible Playbooks and Roles

A comprehensive collection of Ansible playbooks, roles, and automation examples for infrastructure management. This repository serves as a reference implementation and learning resource for Ansible automation.

Contents

Directory Description
playbooks/ Ready-to-use playbooks for common infrastructure tasks
roles/ 200+ Ansible roles for various technologies
Projects/ Complete project examples with inventory and playbooks
vsphere_playbooks/ VMware vSphere automation playbooks
vm_provisioning/ Virtual machine provisioning templates
inventory/ Example inventory configurations

Quick Start

Prerequisites

  • Ansible 2.9+ (tested with Ansible Core 2.12+)
  • Python 3.8+
  • SSH access to target hosts

Installation

  1. Clone this repository:
git clone https://github.com/mrlesmithjr/Ansible.git
cd Ansible
  1. Install all roles from Ansible Galaxy:
ansible-galaxy install -r requirements.yml -f -p ./roles --ignore-errors
  1. Update your inventory file in inventory/ or create your own.

  2. Run a playbook:

ansible-playbook -i inventory/hosts playbooks/bootstrap.yml

Available Playbooks

Playbook Description
bootstrap.yml Initial host configuration and setup
site.yml Full site deployment
elkstack_prod.yml ELK Stack deployment
graylog.yml Graylog log management
gitlab.yml GitLab installation
sensu.yml Sensu monitoring
squid.yml Squid proxy server

Roles

This repository references 200+ roles covering:

  • Monitoring: Netdata, Prometheus, Grafana, Nagios, Sensu
  • Logging: ELK Stack, Graylog, Fluentd
  • Databases: MariaDB, PostgreSQL, MongoDB, Cassandra
  • Virtualization: KVM, Docker, LXC
  • Networking: FRRouting, OpenVSwitch, Netplan
  • Storage: ZFS, LVM, GlusterFS, NFS
  • Security: Fail2ban, UFW, Shorewall

See requirements.yml for the complete list.

Updating Roles

To ensure all roles are current:

ansible-galaxy install -r requirements.yml -f -p ./roles --ignore-errors

Notes

  • All roles can be found in roles/
  • The roles.old/ folder contains archived roles for historical reference
  • Individual roles are also available on Ansible Galaxy

License

MIT

Author Information

Larry Smith Jr.

Buy Me A Coffee

About

Collection of Ansible playbooks, roles, and examples for infrastructure automation

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

No packages published