•  


GitHub - geerlingguy/ansible-for-devops: Ansible for DevOps examples.
Skip to content

geerlingguy/ansible-for-devops

Repository files navigation

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 include s 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.

- "漢字路" 한글한자자동변환 서비스는 교육부 고전문헌국역지원사업의 지원으로 구축되었습니다.
- "漢字路" 한글한자자동변환 서비스는 전통문화연구회 "울산대학교한국어처리연구실 옥철영(IT융합전공)교수팀"에서 개발한 한글한자자동변환기를 바탕하여 지속적으로 공동 연구 개발하고 있는 서비스입니다.
- 현재 고유명사(인명, 지명등)을 비롯한 여러 변환오류가 있으며 이를 해결하고자 많은 연구 개발을 진행하고자 하고 있습니다. 이를 인지하시고 다른 곳에서 인용시 한자 변환 결과를 한번 더 검토하시고 사용해 주시기 바랍니다.
- 변환오류 및 건의,문의사항은 juntong@juntong.or.kr로 메일로 보내주시면 감사하겠습니다. .
Copyright ⓒ 2020 By '전통문화연구회(傳統文化硏究會)' All Rights reserved.
 한국   대만   중국   일본