solar/schema/resources/docker.yml
2015-04-01 13:54:21 -07:00

28 lines
730 B
YAML

---
# ansible playbook to install all docker requirements
# wrapped in ours resource entity
id: docker
type: resource
handler: ansible
version: v1
actions:
run:
- hosts: [docker]
sudo: yes
tasks:
# all of this should be moved to regular ansible playbook
# we need to reuse as much as possible of ansible goodness
- shell: docker --version
ignore_errors: true
register: docker_version
- shell: curl -sSL https://get.docker.com/ubuntu/ | sudo sh
when: docker_version|failed
- shell: docker pull debian:jessie
remove:
- hosts: [docker]
sudo: yes
tasks:
- shell: apt-get remove -y docker