summaryrefslogtreecommitdiff
path: root/roles/docker/alpine.yml
blob: 5e9c29e7a6744b65fbc8bc1ae14d0865169699b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
---
# 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
    docker_container:
      name: hello-world
      image: hello-world