Skip to content

Instantly share code, notes, and snippets.

@binaryphile
Created October 8, 2013 16:02
Show Gist options
  • Save binaryphile/6887034 to your computer and use it in GitHub Desktop.
Save binaryphile/6887034 to your computer and use it in GitHub Desktop.
my playbook for postgresql in a docker instance in a vagrant box
- hosts: all
gather_facts: no
tasks:
- file: path=/usr/sbin/update-apt-xapian-index mode=0644
- copy: src=sources.list dest=/etc/apt/sources.list owner=root group=root mode=0644
- apt: update_cache=yes cache_valid_time=3600
- apt: pkg=linux-image-generic-lts-raring,linux-headers-generic-lts-raring,curl
register: kernel_files
- include: reboot.yml
only_if: ${kernel_files.changed}
- command: sh -c "curl https://get.docker.io/gpg | apt-key add -"
- command: sh -c "echo deb http://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list"
- apt: pkg=lxc-docker update_cache=yes
- copy: src=Dockerfile-pg dest=Dockerfile-pg
- copy: src=insecure_private_key dest=.
- command: docker build Dockerfile-pg
#- apt: upgrade=dist
#- file: path=/usr/sbin/update-apt-xapian-index mode=0644
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment