HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
ansible
ansible-examples
Shell2013–2015
ansible / ansible-examples · Archived

ansible-examples

A few starter examples of ansible playbooks, to show features and how they work together. See http://galaxy.ansible.com for example roles from the Ansible community for deploying many popular applications.

6Distinct people
9Mentions
0Explicit recommenders
12.1KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

A few starter examples of ansible playbooks, to show features and how they work together. See http://galaxy.ansible.com for example roles from the Ansible community for deploying many popular applications.

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 3:56:07 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by month9 dated mentions

Observed mentions: 2013-07-03 13:58:09 UTC to 2015-10-21 15:47:33 UTC.

01232013-07-01 00:00:00 UTC to 2013-08-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsJul 20132013-08-01 00:00:00 UTC to 2013-09-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2013-09-01 00:00:00 UTC to 2013-10-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments2013-10-01 00:00:00 UTC to 2013-11-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2013-11-01 00:00:00 UTC to 2013-12-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2013-12-01 00:00:00 UTC to 2014-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2014-01-01 00:00:00 UTC to 2014-02-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2014-02-01 00:00:00 UTC to 2014-03-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2014-03-01 00:00:00 UTC to 2014-04-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2014-04-01 00:00:00 UTC to 2014-05-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2014-05-01 00:00:00 UTC to 2014-06-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2014-06-01 00:00:00 UTC to 2014-07-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2014-07-01 00:00:00 UTC to 2014-08-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2014-08-01 00:00:00 UTC to 2014-09-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsAug 20142014-09-01 00:00:00 UTC to 2014-10-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2014-10-01 00:00:00 UTC to 2014-11-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2014-11-01 00:00:00 UTC to 2014-12-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2014-12-01 00:00:00 UTC to 2015-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2015-01-01 00:00:00 UTC to 2015-02-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2015-02-01 00:00:00 UTC to 2015-03-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2015-03-01 00:00:00 UTC to 2015-04-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2015-04-01 00:00:00 UTC to 2015-05-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2015-05-01 00:00:00 UTC to 2015-06-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2015-06-01 00:00:00 UTC to 2015-07-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2015-07-01 00:00:00 UTC to 2015-08-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2015-08-01 00:00:00 UTC to 2015-09-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2015-09-01 00:00:00 UTC to 2015-10-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2015-10-01 00:00:00 UTC to 2015-11-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 commentsOct 2015

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
Jul 20132013-07-01 00:00:00 UTC2013-08-01 00:00:00 UTC101
Aug 20132013-08-01 00:00:00 UTC2013-09-01 00:00:00 UTC000
Sep 20132013-09-01 00:00:00 UTC2013-10-01 00:00:00 UTC303
Oct 20132013-10-01 00:00:00 UTC2013-11-01 00:00:00 UTC000
Nov 20132013-11-01 00:00:00 UTC2013-12-01 00:00:00 UTC101
Dec 20132013-12-01 00:00:00 UTC2014-01-01 00:00:00 UTC000
Jan 20142014-01-01 00:00:00 UTC2014-02-01 00:00:00 UTC101
Feb 20142014-02-01 00:00:00 UTC2014-03-01 00:00:00 UTC000
Mar 20142014-03-01 00:00:00 UTC2014-04-01 00:00:00 UTC000
Apr 20142014-04-01 00:00:00 UTC2014-05-01 00:00:00 UTC000
May 20142014-05-01 00:00:00 UTC2014-06-01 00:00:00 UTC000
Jun 20142014-06-01 00:00:00 UTC2014-07-01 00:00:00 UTC000
Jul 20142014-07-01 00:00:00 UTC2014-08-01 00:00:00 UTC000
Aug 20142014-08-01 00:00:00 UTC2014-09-01 00:00:00 UTC101
Sep 20142014-09-01 00:00:00 UTC2014-10-01 00:00:00 UTC000
Oct 20142014-10-01 00:00:00 UTC2014-11-01 00:00:00 UTC000
Nov 20142014-11-01 00:00:00 UTC2014-12-01 00:00:00 UTC000
Dec 20142014-12-01 00:00:00 UTC2015-01-01 00:00:00 UTC000
Jan 20152015-01-01 00:00:00 UTC2015-02-01 00:00:00 UTC000
Feb 20152015-02-01 00:00:00 UTC2015-03-01 00:00:00 UTC000
Mar 20152015-03-01 00:00:00 UTC2015-04-01 00:00:00 UTC000
Apr 20152015-04-01 00:00:00 UTC2015-05-01 00:00:00 UTC000
May 20152015-05-01 00:00:00 UTC2015-06-01 00:00:00 UTC000
Jun 20152015-06-01 00:00:00 UTC2015-07-01 00:00:00 UTC000
Jul 20152015-07-01 00:00:00 UTC2015-08-01 00:00:00 UTC000
Aug 20152015-08-01 00:00:00 UTC2015-09-01 00:00:00 UTC000
Sep 20152015-09-01 00:00:00 UTC2015-10-01 00:00:00 UTC000
Oct 20152015-10-01 00:00:00 UTC2015-11-01 00:00:00 UTC202

What Hacker News says

9 sources
I did a quick smoke test to see if Tutum passes muster. My smoke test for this kind of tool is if they have a solution for deploying mongodb as a production level service with sharding or at the very least replica sets. Like so many other “let’s do the easy part and stop there” companies, they have a template for starting a single development mongodb node that would be easy enough to do myself. I want a tool that has a repository of templates for making formations of very hard things easy. Openshift is at least working on it: https://github.com/openshift/mongodb Their replica set version is not able to persist data permanently until Kubernetes figures out how to attach separate persistent volumes to pods in the same service. Unfortunately, Amazon is again the only game in town that does exactly what I want: https://aws.amazon.com/blogs/aw
Read the rest
s/mongodb-on-the-aws-cloud-ne.... If I want to run locally, I have to ditch Docker entirely and just use Ansible: https://github.com/ansible/ansible-examples/tree/master/mong...
In Docker Acquires Tutum
> Lisp is not and has never been the right tool for configuration management. Why not? Configurations are collections of items, and among the things Lisp excels at is…lists of atoms. Take a look at https://github.com/ansible/ansible-examples/tree/master/lamp... (a simple LAMP stack implemented in Ansible). It uses a .ini-style file to manage lists of hosts, e.g.: [webservers] localhost [dbservers] bensible sensible Why not put that in a list? (hosts (webservers localhost) (dbservers bensible sensible)) The Ansible playbooks are YAML lists. There's no particular reason that: --- # This playbook deploys the whole application stack in this site - name: apply common configuration to all nodes hosts: all remote_user: root roles: - common … is more readable
Read the rest
than: (playbook "This playbook deploys the whole application stack in this site" (play "apply common configuration to all nodes" (hosts all) (remote-user root) (roles common) …) or: (playbook '((all '(common) :user root :comment "apply common configuration to all nodes") …) :comment "This playbook deploys the whole application stack in this site") In fact, I'd argue that both Lispy representations are much more readable.
In Red Hat is buying Ansible
Note, I wrote the program, but I'd disagree very very strongly with this - we have a giant ton of Mac users. I'm sorry you had install problems and had trouble reading our install chapter: http://docs.ansible.com/intro_installation.html ... I will say the docs are open source, so if you want to add a note about how to get something easier compiled on OS X or something, click the GitHub link in the upper right and you're off and running :) We get a lot of strong positives about how awesome our docs are, so I'm really interested in what you think we could do to improve them -- but they were absolutely not modelled on Chef and Puppets. Chef has about 1000 pages of docs, Ansible covers the majority of everything in a dozen pages. Most folks get up and running (with working playbooks running real applications) in 30 minutes or an hour. My ph
Read the rest
ilosophy on docs are mainly to address things in the order folks will want to learn things, but also make it easy to hop over sections people will not. Show examples, don't make a reference manual. Though there's a need for reference content, which is where stuff like galaxy.ansible.com content and github.com/ansible/ansible-examples steps in, so you can see it put together. More tutorials I think would still be useful in the main docs. But yeah, a discussion on what you like to see differently would be interesting. While I do understand you have to do something to install the program, what you have to do to configure it once installed is pretty short, and the install itself should still only take a few minutes. I'll give you the fact that Macs are not Linux, but they are getting there :) I'm interested in your Mavericks error and you should definitely stop by the list about that one, or just consider the homebrew install. Another great thing to do since you are already are on a Mac is just start doing your development on Linux in a VM :) Not that we require it, we don't... but it's great when you've got a real package manager stock! Another easy thing you can do is just checkout the git source and do "source ./hacking/env-setup" and then you are running straight out of source. This is what I do on OS X most of the time, and we have a large number of users that follow the development branch full time.
In Servers are fun: Ansible
Agreed. As well as the reasonably good ansible documentation, checkout the ansible-examples github repo. ( https://github.com/ansible/ansible-examples ) There's a few initial 'conventions' to figure out (roles, group vars, playbooks), but then it's so incredibly simple to get into. My dad is playing with a raspberry pi at home, wanting to set up a web kiosk thing. I'd been doing something similar a few months ago for work, so I send him my ansible playbook. He could follow it as if it were a plain text checklist/tutorial, without needing ansible at all. If he wants to automate it, he can. That, I think, is one of the benefits of ansible. It's not a lot more work than just writing an overview of what you need to do in the first place, but with the benefit of it being repeatable and automated.
In New Year's Resolutions for SysAdmins
Thanks for feedback. I would suggest looking at github.com/ansible/ansible-examples for a fair amount of examples. I think it's generally true of most systems that a lot of the community implemented content is suited to the needs of someone who wrote it. As for content sharing, we might be working on something :) Stay tuned!
In Shell Scripts vs. Ansible
Sorry, but I'm not finding a link to those playbooks anywhere in the Ansible docs. The only cross-platform example I could find in the examples was the riak one [1]. Based on that example and the modules you mentioned, I'm guessing that the only real mechanism for multi-OS playbooks are separate sets of YAML files for each OS? If so, that's not exactly a great abstraction, though I'll agree it is workable. Still seems to be leaving Windows out in the cold altogether, as well, which is a show-stopper for my mixed environments. [1] https://github.com/ansible/ansible-examples/tree/master/riak
In On Ansible
Actually ansible has quite a few abstractions available, namely you can use the 'group_by' module to dynamically select machines by OS, and 'roles' which allow abstracting away behavior from applying state. The 'when' conditional can also be used for OS variance. One thing you may want to look at are the playbooks that we use to set up AWX, our UI, which works on both CentOS and Ubuntu and has some very different steps in place. You can also see some examples in github.com/ansible/ansible-examples We don't believe in hiding too many OS details from you -- for instance, not only do package names vary between distributions but think about how Apache is managed so very differently between Ubuntu and CentOS -- in fact, we've observed in many cases that trying to pave over those things can make content a lot harder to work on. Generally peopl
Read the rest
e know what infrastructure they are running on and I think it's best when you take advantage of that, though you can easily have certain steps (see the 'when' conditional) that apply to specific OSes. Another thing Ansible does is make it easy to do conditionals at runtime, such as "if this file is present, then do this", etc.
In On Ansible

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.