This is a mirror of Jeff Geerling's Ansible for DevOps Github repository.
 
 
 
 
 
 
Go to file
Jeff Geerling 8058f712c3 Add a link to the book's manuscript repository. 2023-06-29 11:03:10 -05:00
.github Proper way of installing molecule with docker tests. 2023-06-17 21:48:26 -05:00
collection Issue #202: Local collections don't require config to be picked up. 2020-06-16 22:32:07 -05:00
deployments Update all Vagrant VM host-only private network IP ranges. 2022-11-27 13:33:52 -06:00
deployments-balancer Update all Vagrant VM host-only private network IP ranges. 2022-11-27 13:33:52 -06:00
deployments-rolling Update all Vagrant VM host-only private network IP ranges. 2022-11-27 13:33:52 -06:00
docker Issue #310: Fix link to Docker Flask app example. [ci skip] 2020-08-05 13:43:31 -05:00
docker-flask Update all Vagrant VM host-only private network IP ranges. 2022-11-27 13:33:52 -06:00
docker-hubot Remove deprecated warn option from docker-hubot example. 2022-11-26 22:59:07 -06:00
drupal Change PHP version to 8.2 and Drush to 11* 2023-02-11 13:58:13 +06:00
dynamic-inventory Update all Vagrant VM host-only private network IP ranges. 2022-11-27 13:33:52 -06:00
elk Update all Vagrant VM host-only private network IP ranges. 2022-11-27 13:33:52 -06:00
first-ansible-playbook Fixes #501: Update some references from yum to dnf. Hopefully not breaking. 2022-09-08 23:30:17 -05:00
galaxy-role-servers Update all Vagrant VM host-only private network IP ranges. 2022-11-27 13:33:52 -06:00
gluster Update all Vagrant VM host-only private network IP ranges. 2022-11-27 13:33:52 -06:00
https-letsencrypt Correct ansible installation link 2021-06-23 13:34:07 +03:00
https-nginx-proxy Update all Vagrant VM host-only private network IP ranges. 2022-11-27 13:33:52 -06:00
https-self-signed Update all Vagrant VM host-only private network IP ranges. 2022-11-27 13:33:52 -06:00
includes Update all Vagrant VM host-only private network IP ranges. 2022-11-27 13:33:52 -06:00
jenkins Update all Vagrant VM host-only private network IP ranges. 2022-11-27 13:33:52 -06:00
kubernetes Merge pull request #471 from hippogriffin/470-k8s-1.19 2023-06-17 23:00:21 -05:00
lamp-infrastructure Update all Vagrant VM host-only private network IP ranges. 2022-11-27 13:33:52 -06:00
molecule Small fix to README. 2023-06-17 22:18:16 -05:00
nodejs Update all Vagrant VM host-only private network IP ranges. 2022-11-27 13:33:52 -06:00
nodejs-role Update all Vagrant VM host-only private network IP ranges. 2022-11-27 13:33:52 -06:00
orchestration Update all Vagrant VM host-only private network IP ranges. 2022-11-27 13:33:52 -06:00
security Fixes #501: Update some references from yum to dnf. Hopefully not breaking. 2022-09-08 23:30:17 -05:00
solr Update all Vagrant VM host-only private network IP ranges. 2022-11-27 13:33:52 -06:00
test-plugin Issue #202: More idiomatic Ansible Python style. 2020-06-14 15:42:33 -05:00
tests Fixes #531: systemd with molecule Docker containers requires cgroupns set to host and rw. 2023-06-17 21:57:54 -05:00
.gitignore Fixes #249: Update Helm example in chapter 16. 2020-07-21 10:05:38 -05:00
LICENSE Issue #5: Add MIT License. 2014-12-08 15:55:02 -06:00
README.md Add a link to the book's manuscript repository. 2023-06-29 11:03:10 -05:00

README.md

Ansible for DevOps Examples

CI Molecule CI

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

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 automation tasks to demonstrate how Ansible helps automate security hardening.

Chapter 12

  • jenkins: A playbook that installs and configures Jenkins for CI/CD.

Chapter 13

  • molecule: A Molecule example used for testing and developing an Ansible playbook, or for testing in a Continuous Integration (CI) environment.
  • molecule-ci.yml GitHub Actions workflow: A GitHub Actions workflow which runs the molecule example in a CI environment.

Chapter 14

  • https-self-signed: A playbook that generates self-signed certificates.
  • https-letsencrypt: A playbook that demonstrates automated certificate management with Let's Encrypt and Ansible.
  • https-nginx-proxy: A playbook that demonstrates proxying HTTPS traffic through Nginx to HTTP backends.

Chapter 15

  • docker: Very simple playbook demonstrating Ansible's ability to manage Docker container images.
  • docker-hubot: Slightly more involved example of Ansible's ability to manage and run Docker container images.
  • docker-flask: A sample Flask app built with Ansible playbooks running inside the container.

Chapter 16

  • kubernetes: A playbook that builds a three-node Kubernetes cluster.

License

MIT

Sponsors

  • TinyPilot: An open-source, low-cost KVM over IP for managing your servers.

The above sponsor(s) are supporting Jeff Geerling on GitHub Sponsors. You can sponsor Jeff's work too, to help him continue improving this book and Ansible open source work!

Buy the Book

Ansible for DevOps Cover

Buy Ansible for DevOps for your e-reader or in paperback format.