A curated collection of real-world Ansible playbook repositories and task examples for common server provisioning and application deployments.
🔗 Related: Ansible Core Cheat Sheet · Ansible Modules Cheat Sheet · Ansible Quickstart Guide
Open-Source Playbook Implementations
- Web Server & Ruby Stack: Ansible Ruby Example Playbook (roles/webserver)
- PostgreSQL Database Server: Ansible Postgres Example Playbook (roles/db)
- Self-Hosted GitLab Instance: Ansible GitLab Playbook
Common Multi-Task Snippets
Full Nginx + Let's Encrypt SSL Setup
- name: Configure Web Server with Nginx
hosts: webservers
become: true
tasks:
- name: Ensure Nginx is installed
apt:
name: nginx
state: present
update_cache: yes
- name: Copy site configuration template
template:
src: templates/nginx.conf.j2
dest: /etc/nginx/sites-available/default
notify: Reload Nginx
- name: Ensure Nginx service is running and enabled
service:
name: nginx
state: started
enabled: yes
handlers:
- name: Reload Nginx
service:
name: nginx
state: reloaded