https://github.com/geerlingguy/ansible-for-devops
Ansible for DevOps examples.
https://github.com/geerlingguy/ansible-for-devops
amazon ansible aws book devops docker examples jeff-geerling kindle kubernetes leanpub playbook vagrant
Last synced: 5 days ago
JSON representation
Ansible for DevOps examples.
- Host: GitHub
- URL: https://github.com/geerlingguy/ansible-for-devops
- Owner: geerlingguy
- License: mit
- Created: 2014-04-25T01:44:25.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2024-03-08T11:04:55.000Z (about 1 year ago)
- Last Synced: 2025-04-09T18:15:57.548Z (5 days ago)
- Topics: amazon, ansible, aws, book, devops, docker, examples, jeff-geerling, kindle, kubernetes, leanpub, playbook, vagrant
- Language: Python
- Homepage: https://www.ansiblefordevops.com
- Size: 479 KB
- Stars: 8,910
- Watchers: 373
- Forks: 3,592
- Open Issues: 118
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Security: security/README.md
Awesome Lists containing this project
- awesome-ansible - Ansible For DevOps - This repository contains Ansible examples developed to support different sections of `Ansible for DevOps` by Jeff Geerling, which is listed in the following section of books about Ansible. (Tutorials)
- Retro-Gaming-Guide - Ansible for DevOps Examples by Jeff Geerling
- jimsghstars - geerlingguy/ansible-for-devops - Ansible for DevOps examples. (Python)
- StarryDivineSky - geerlingguy/ansible-for-devops - for-devops项目提供了一系列Ansible示例,旨在帮助开发者学习和实践DevOps自动化。该项目包含各种playbook、角色和配置,涵盖了常见的DevOps任务,如服务器配置、应用部署和基础设施管理。通过这些示例,用户可以了解如何使用Ansible进行自动化配置管理,提高开发和运维效率。项目特色在于其清晰的结构和易于理解的示例代码,适合初学者和有经验的Ansible用户。它展示了Ansible如何通过YAML文件描述所需的状态,并自动化执行配置任务,从而简化了复杂系统的管理。用户可以根据自己的需求修改和扩展这些示例,快速构建自己的自动化解决方案。该项目是学习Ansible和DevOps实践的宝贵资源。 (后端开发框架及项目 / 后端项目_其他)
- stars - ansible-for-devops
- stars - ansible-for-devops
- awesome-list-ansible - ansible-for-devops
README
# Ansible for DevOps Examples
[](https://github.com/geerlingguy/ansible-for-devops/actions?query=workflow%3ACI) [](https://github.com/geerlingguy/ansible-for-devops/actions?query=workflow%3A%22Molecule+CI%22)
This repository contains Ansible examples developed to support different sections of [Ansible for DevOps](https://www.ansiblefordevops.com/), a book on [Ansible](http://www.ansible.com/) by [Jeff Geerling](https://www.jeffgeerling.com/).
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](https://github.com/geerlingguy/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`](first-ansible-playbook/): A very basic playbook that installs `chronyd` on CentOS and ensures it is running.
### Chapter 3
- [`orchestration`](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`](drupal/): A single-file playbook which configures the LAMP stack on a Linux host and installs Drupal.
- [`includes`](includes/): The same playbook as the [`drupal`](drupal/) example, but using `include`s to make the playbook more understandable.
- [`nodejs`](nodejs/): A single-file playbook which configures a Node.js app to run on a Linux host.
- [`solr`](solr/): A single-file playbook which installs Apache Solr on a Linux host.### Chapter 5
- N/A
### Chapter 6
- [`nodejs-role`](nodejs-role/): The same playbook as the [`nodejs`](nodejs/) example, but using a role to break out the Node.js aspects into a separate `nodejs` role.
- [`galaxy-role-servers`](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`](test-plugin/): A simple test plugin that verifies a given value is representative of the color blue.
- [`collection`](collection/): An example local collection to demonstrate the basic structure of content collections.### Chapter 8
- [`dynamic-inventory`](dynamic-inventory/): Two example dynamic inventory scripts (one in PHP, one in Python) for use with Ansible.
### Chapter 9
- [`lamp-infrastructure`](lamp-infrastructure/): A multi-server LAMP-based web application infrastructure focused on high-availability and performance for a LAMP-stack app.
- [`elk`](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`](gluster/): A two-server example of building a fast networked storage setup using Gluster.### Chapter 10
- [`deployments`](deployments/): A playbook that deploys a Ruby on Rails application into an environment that runs Passenger and Nginx to handle web requests.
- [`deployments-balancer`](deployments-balancer/): A playbook that handles zero-downtime deployments to webservers running behind an HAProxy load balancer.
- [`deployments-rolling`](deployments-rolling/): A playbook that demonstrates rolling deployments to multiple servers for a Node.js app.### Chapter 11
- [`security`](security/): A playbook containing many security automation tasks to demonstrate how Ansible helps automate security hardening.
### Chapter 12
- [`jenkins`](jenkins/): A playbook that installs and configures Jenkins for CI/CD.
### Chapter 13
- [`molecule`](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](.github/workflows/molecule-ci.yml): A GitHub Actions workflow which runs the `molecule` example in a CI environment.### Chapter 14
- [`https-self-signed`](https-self-signed/): A playbook that generates self-signed certificates.
- [`https-letsencrypt`](https-letsencrypt/): A playbook that demonstrates automated certificate management with Let's Encrypt and Ansible.
- [`https-nginx-proxy`](https-nginx-proxy/): A playbook that demonstrates proxying HTTPS traffic through Nginx to HTTP backends.### Chapter 15
- [`docker`](docker/): Very simple playbook demonstrating Ansible's ability to manage Docker container images.
- [`docker-hubot`](docker-hubot/): Slightly more involved example of Ansible's ability to manage and run Docker container images.
- [`docker-flask`](docker-flask/): A sample Flask app built with Ansible playbooks running inside the container.### Chapter 16
- [`kubernetes`](kubernetes/): A playbook that builds a three-node Kubernetes cluster.
## License
MIT
## Sponsors
* [TinyPilot](https://tinypilotkvm.com): An open-source, low-cost KVM over IP for managing your servers.
The above sponsor(s) are supporting Jeff Geerling on [GitHub Sponsors](https://github.com/sponsors/geerlingguy). You can sponsor Jeff's work too, to help him continue improving this book and Ansible open source work!
## Buy the Book
[](https://www.ansiblefordevops.com/)
Buy [Ansible for DevOps](https://www.ansiblefordevops.com/) for your e-reader or in paperback format.