+2
Daily
9,955
stars
3,809
forks
375
watchers
102
prs
494
issues
0
releases
README
Ansible for DevOps Examples This repository contains Ansible examples developed to support different sections of Ansible for DevOps, a book on Ansible by Jeff Geerling. Many examples use Vagrant, VirtualBox, and Ansible to boot and configure VMs on your local workstation. Not all playbooks follow all of Ansible's best practices, as they illustrate particular Ansible features in an instructive manner. Manuscript The book's manuscript is released under the CC BY-SA license, and is publicly available in a separate repository: Ansible for DevOps - Manuscript. Examples and Chapters in which they're used Here is an outline of all the examples contained in this repository, by chapter: Chapter 1 - N/A Chapter 2 - first-ansible-playbook: A very basic playbook that installs chronyd on CentOS and ensures it is running. Chapter 3 - orchestration: A simple multiple-VM Vagrant configuration and Ansible inventory to allow testing of multi-server orchestration with ansible ad-hoc commands. Chapter 4 - drupal: A single-file playbook which configures the LAMP stack on a Linux host and installs Drupal. - includes: The same playbook as the drupal example, but using includes to make the playbook more understandable. - nodejs: A single-file playbook which configures a Node.js app to run on a Linux host. - solr: A single-file playbook which installs Apache Solr on a Linux host. Chapter 5 - N/A Chapter 6 - nodejs-role: The same playbook as the nodejs example, but using a role to break out the Node.js aspects into a separate nodejs role. - galaxy-role-servers: A couple very short playbooks that demonstrate how easy it is to get new servers running leveraging the power of community Ansible Galaxy roles. Chapter 7 - test-plugin: A simple test plugin that verifies a given value is representative of the color blue. - collection: An example local collection to demonstrate the basic structure of content collections. Chapter 8 - dynamic-inventory: Two example dynamic inventory scripts (one in PHP, one in Python) for use with Ansible. Chapter 9 - lamp-infrastructure: A multi-server LAMP-based web application infrastructure focused on high-availability and performance for a LAMP-stack app. - elk: A two-server example of the Elasticsearch-Logstash-Kibana stack, which uses one server to store and visualize logs centrally, and another server to send logs via Filebeat. - gluster: A two-server example of building a fast networked storage setup using Gluster. Chapter 10 - deployments: A playbook that deploys a Ruby on Rails application into an environment that runs Passenger and Nginx to handle web requests. - deployments-balancer: A playbook that handles zero-downtime deployments to webservers running behind an HAProxy load balancer. - deployments-rolling: A playbook that demonstrates rolling deployments to multiple servers for a Node.js app. Chapter 11 - security: A playbook containing many security
Top issues
#404Apple Silicon (arm64) - what should I do with VirtualBox-based examples?40 comments · 2021-06-08#291Appendix A - Vagrant with VirtualBox within WSL2 to run ansible-for-devops VMs36 comments · 2020-06-24#418Unreachable vagrant boxes15 comments · 2021-09-03#574molecule init role is gone11 comments · 2024-01-26#583Install Druplal on ubuntu 22.04 - [Errno 2] No such file or directory: b'vendor/bin/drush'7 comments · 2024-04-29#522Vagrant up and provisioning failing7 comments · 2023-01-17#433Page 39 - Chapter 3 - Enable firewalld on db6 comments · 2021-12-29#421Ansible is being run in a world writable directory6 comments · 2021-09-25
Discussions
#621Chapter 2 - MODULE FAILURE with Rocky Linux 8 and Ansible 2.17+ (Python 3.6 vs 3.8+)1 comments · 2026-08-04#537Check mode for a tasks in converge.yml in molecule1 comments · 2023-03-13#530how to handle packages in ansible that have custom scripts on install0 comments · 2023-02-23#509Chapter 13 (book version 2.1) molecule commands do not execute as expected1 comments · 2022-11-12#474Hi,1 comments · 2022-05-02#441Why does 'on' have single quotes in the ci.yml?1 comments · 2022-01-08#435Running the code I get an error on apt Cache1 comments · 2022-01-03#432Issues running through the molecule labs0 comments · 2021-12-29