- name: install docker
  apt: name=docker.io state=latest
  notify: docker from experimental

- name: create docker fs
  filesystem:
    dev: "{{ docker_dev }}"
    fstype: btrfs

- name: create directory for ansible custom facts
  file: state=directory recurse=yes path=/etc/ansible/facts.d

- name: create fact for docker fs blkid
  template:
    src: etc/ansible/facts.d/docker_blkid.fact
    dest: /etc/ansible/facts.d/docker_blkid.fact
    mode: 500

- name: re-read facts after adding custom fact
  setup: filter=ansible_local

- name: mount docker fs
  mount:
    src: UUID={{ ansible_local.docker_blkid }}
    name: /var/lib/docker
    fstype: btrfs
    state: mounted
  notify: restart docker

- name: install docker
  apt: name=docker.io state=latest
  notify: docker from experimental

- name: create docker fs
  filesystem:
    dev: "{{ docker_dev }}"
    fstype: btrfs

- name: create directory for ansible custom facts
  file: state=directory recurse=yes path=/etc/ansible/facts.d

- name: create fact for docker fs blkid
  template:
    src: etc/ansible/facts.d/docker_blkid.fact
    dest: /etc/ansible/facts.d/docker_blkid.fact
    mode: 500

- name: re-read facts after adding custom fact
  setup: filter=ansible_local

- name: mount docker fs
  mount:
    src: UUID={{ ansible_local.docker_blkid }}
    name: /var/lib/docker
    fstype: btrfs
    state: mounted
  notify: restart docker

- name: install python-docker
  apt: name=python-docker state=latest

- name: generate container config dir
  file: state=directory recurse=yes path=/etc/container_environment

Prepare docker installation for further uses
Prepare docker installation for further uses

Signed-off-by: Jan Losinski <577c4104c61edf9f052c616c0c23e67bef4a9955@wh2.tu-dresden.de>
