---
- include: lvmthinpool.yml
  when: docker_storage_opts.find("thinpooldev") != -1 and docker_init_storage

- include: overlayfs.yml
  when: docker_storage_opts.find("overlayfs") != -1 and docker_init_storage

- name: Install Docker Repository
  template: src=docker-repo.j2 dest=/etc/yum.repos.d/docker.repo
 
- name: Install Docker Engine
  yum: name={{ item }} state=present
  with_items:
    - docker-{{ docker_version }}

- name: Install pip
  easy_install: name=pip

- name: Install docker-py
  pip: name=docker-py state=latest
---
- name: Make sure Docker is started
  service: name=docker.service state=stopped
  when: docker_init_storage

- include: lvmthinpool.yml
  when: docker_storage_opts.find("thinpooldev") != -1 and docker_init_storage

- include: overlayfs.yml
  when: docker_storage_opts.find("overlayfs") != -1 and docker_init_storage

- name: Install Docker Repository
  template: src=docker-repo.j2 dest=/etc/yum.repos.d/docker.repo
 
- name: Install Docker Engine
  yum: name={{ item }} state=present
  with_items:
    - docker-{{ docker_version }}

- name: Install pip
  easy_install: name=pip

- name: Install docker-py
  pip: name=docker-py state=latest
Make sure docker is stopped before initializing storage
Make sure docker is stopped before initializing storage
