Skip to content

Instantly share code, notes, and snippets.

---
# 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
curl -X POST --data-binary @payload.yaml -H "Content-type: text/x-yaml" http://localhost:4200/some-url/1024
@stevepereira
stevepereira / initialize.pp
Created January 31, 2012 17:19 — forked from jperras/initialize.pp
Initialization puppet script for puppetmasterless puppet setup.
user { "git":
home => "/var/git",
ensure => present
}
file {
"/var/git":
ensure => directory,
owner => "git",
group => "git",
@stevepereira
stevepereira / README.md
Created October 23, 2012 01:42 — forked from silas/README.md
Vagrant and devstack

Download and install VirtualBox

Download and install Vagrant

Clone devstack repository

    git clone git://github.com/openstack-dev/devstack.git

Switch to devstack directory