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.
| 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 |
- Ansible 2.9+ (tested with Ansible Core 2.12+)
- Python 3.8+
- SSH access to target hosts
- Clone this repository:
git clone https://github.com/mrlesmithjr/Ansible.git
cd Ansible- Install all roles from Ansible Galaxy:
ansible-galaxy install -r requirements.yml -f -p ./roles --ignore-errors-
Update your inventory file in
inventory/or create your own. -
Run a playbook:
ansible-playbook -i inventory/hosts playbooks/bootstrap.yml| 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 |
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.
To ensure all roles are current:
ansible-galaxy install -r requirements.yml -f -p ./roles --ignore-errors- 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
MIT
Larry Smith Jr.
