Skip to content

Instantly share code, notes, and snippets.

---
# ^^^ YAML documents must begin with the document separator "---"
#
#### Example docblock, I like to put a descriptive comment at the top of my
#### playbooks.
#
# Overview: Playbook to bootstrap a new host for configuration management.
# Applies to: production
# Description:
# Ensures that a host is configured for management with Ansible.
server {
listen 8443 default ssl;
server_name www.yourdomain.com;
ssl on;
ssl_certificate /etc/nginx/conf.d/cert.pem;
ssl_certificate_key /etc/nginx/conf.d/cert.key;
client_max_body_size 50M;
error_log /var/log/nginx/elasticsearch-errors.log;
---
# file ruby.yml
- hosts: all
gather_facts: false
sudo: true
vars:
# Where to install rbenv
- rbenv_root: /usr/local/rbenv
# The version of Ruby to install
---
# This has been tested with ansible 1.3 with these commands:
# ansible-playbook -i hosts ansible_conditionals_examples.yaml --extra-vars="hosts=myhosts isFirstRun=false"
# ansible-playbook -i hosts ansible_conditionals_examples.yaml --extra-vars="hosts=myhosts isFirstRun=true"
# ansible-playbook -i hosts ansible_conditionals_examples.yaml --extra-vars="hosts=myhosts"
# NB: The type of the variable is crucial!
- name: Ansible Conditionals Examples
hosts: $hosts
vars_files:
<section data-background-transition='zoom' data-transition='concave' data-background='http://ryanjarvinen.com/presentations/shared/img/broadcast_reveal_dark.png' data-state='blackout'>
<h2>Broadcasting Your</h3>
<h1>Reveal.js</h1>
<h2>Slideshow Presentations</h2>
<img style="disply:block;border:none;background:none;box-shadow:none;width:35%;" alt='Docker-logo' src='https://gist.githubusercontent.com/ryanj/7ebf56442930b4c2188b/raw/6a6e03247efb03a0eee24a12f7beaf1ab4634563/Docker-whale.png'/>
<p class='fragment'><small><a href='http://gist-reveal.it/'>gist-reveal.it</a><br/>
<a class='fragment' href='http://github.com/ryanj/gist-reveal.it'>github.com/ryanj/gist-reveal.it</a>
<br/> <a class='fragment' href='https://registry.hub.docker.com/u/ryanj/gist-reveal.it/'>registry.hub.docker.com/u/ryanj/gist-reveal.it</a></small></p>
</section>
<section data-background-transition='zoom' data-transition='linear'>
# prevent the creation of .DS_Store files on network drives
# http://hints.macworld.com/article.php?story=2005070300463515
defaults write com.apple.desktopservices DSDontWriteNetworkStores true
#---------------------------------------------------------------------
# Disable/enable Dashboard:
# http://hints.macworld.com/article.php?story=20050723123302403
defaults write com.apple.dashboard mcx-disabled -boolean YES
# using VirtualBox version $VBOX_VERSION
FROM boot2docker/boot2docker
RUN apt-get install -y p7zip-full
RUN mkdir -p /vboxguest && \
cd /vboxguest && \
curl -L -o vboxguest.iso http://download.virtualbox.org/virtualbox/$VBOX_VERSION/VBoxGuestAdditions_$VBOX_VERSION.iso && \
7z x vboxguest.iso -ir'!VBoxLinuxAdditions.run' && \
sh VBoxLinuxAdditions.run --noexec --target . && \
@stevepereira
stevepereira / Vagrantfile
Last active August 29, 2015 14:06 — forked from gijs/Vagrantfile
So far both rsync and nfs both suck - tail -f in docker container doesn't hear the modify but the file does update (used with vagrant rsync-auto in combination with rsync)
# -*- mode: ruby -*-
# # vi: set ft=ruby :
require 'fileutils'
CLOUD_CONFIG_PATH = File.join(File.dirname(__FILE__), "user-data")
CONFIG = File.join(File.dirname(__FILE__), "config.rb")
# Defaults for config options defined in CONFIG
$num_instances = 1
#create data directory to contain any data we want persisted
sudo mkdir /var/lib/boot2docker/data && sudo chown docker:staff /var/lib/boot2docker/data
#pull busybox and set it up as a data volume container
docker run -v /var/lib/boot2docker/data:/data --name data-share busybox true
#pull svendowideit/samba and run it with the data-share container
#docker run --rm -v $(which docker):/docker -v /var/run/docker.sock:/docker.sock svendowideit/samba data-share
#make sure the samba share runs next time boot2docker starts