Skip to content

Instantly share code, notes, and snippets.

@ayr-ton
Last active August 29, 2015 14:22
Show Gist options
  • Save ayr-ton/cdf83487f5ffa5be1dff to your computer and use it in GitHub Desktop.
Save ayr-ton/cdf83487f5ffa5be1dff to your computer and use it in GitHub Desktop.
Playbooks for install all my docker gadgets
---
- hosts: '{{ hosts }}'
sudo: yes
tasks:
- name: Install curl
apt: pkg=curl state=latest update_cache=yes
- name: Install docker-compose
shell: curl -L https://github.com/docker/compose/releases/download/1.3.1/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
- name: Verify if docker-compose was installed and set exec permissions to this
file: path=/usr/local/bin/docker-compose state=file mode="a+x"
---
- hosts: '{{ hosts }}'
sudo: yes
tasks:
- name: Install curl
apt: pkg=curl state=latest update_cache=yes
- name: Install docker-machine
shell: curl -L https://github.com/docker/machine/releases/download/v0.3.0/docker-machine_linux-amd64 > /usr/local/bin/docker-machine
- name: Verify if docker-machine was installed and set exec permissions to this
file: path=/usr/local/bin/docker-machine state=file mode="a+x"
---
- hosts: '{{ hosts }}'
sudo: yes
tasks:
- name: Install wget
apt: pkg=wget state=latest update_cache=yes
- name: Install docker
shell: wget -qO- https://get.docker.com/ | sh
localhost ansible_connection=local accept_hostkey=yes
@ayr-ton
Copy link
Author

ayr-ton commented Jun 1, 2015

For install docker-machine for localhost, for example:

 ansible-playbook -e hosts=localhost docker-machine.yml 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment