summaryrefslogtreecommitdiff
path: root/roles/docker/alpine.yml
diff options
context:
space:
mode:
Diffstat (limited to 'roles/docker/alpine.yml')
-rw-r--r--roles/docker/alpine.yml39
1 files changed, 39 insertions, 0 deletions
diff --git a/roles/docker/alpine.yml b/roles/docker/alpine.yml
new file mode 100644
index 0000000..98160a0
--- /dev/null
+++ b/roles/docker/alpine.yml
@@ -0,0 +1,39 @@
+---
+# Hosts: debian, arch
+- name: Install Docker on Alpine LXC Container
+ hosts: docker_alpine_lxc
+
+ tasks:
+
+ - name: Installing Docker
+ apk:
+ state: present
+ update_cache: yes
+ name:
+ - docker
+ - docker-py
+
+ - name: Ensuring Docker has been started
+ service:
+ name: docker
+ state: started
+ enabled: yes
+
+ - name: Copying cgroups mount script to local.d
+ copy:
+ src: 1-cgroup-docker.start
+ dest: /etc/local.d/1-cgroup-docker.start
+ mode: '0700'
+
+ - name: Ensuring local service has been started
+ service:
+ name: local
+ state: started
+ enabled: yes
+
+ - name: Running hello world test
+ shell: docker run hello-world && touch /tmp/.docker-success
+ register: output
+ args:
+ creates: /tmp/.docker-success
+ - debug: var=output