---

- name: "Install Docker rpm key"
  become: yes
  rpm_key: 
    key: "https://sks-keyservers.net/pks/lookup?op=get&search=0xee6d536cf7dc86e2d7d56f59a178ac6c6238f52e"
    state: present

# install yum utils and Docker repo
- name: "Install yum utils"
  become: yes
  yum:
    name: yum-utils
    state: installed
- name: "Install Docker yum repo"
  become: yes
  command: "yum-config-manager --add-repo https://packages.docker.com/1.10/yum/repo/main/centos/7"

- name: "Install Docker package"
  become: yes
  yum:
    name: docker-engine
    update_cache: yes
    state: installed

## Storage?
    
# # enable
# # become systemctl enable docker.service
# # become systemctl start docker.service
# ~                                            

---

- name: "Install Docker rpm key"
  become: yes
  rpm_key: 
    key: "https://sks-keyservers.net/pks/lookup?op=get&search=0xee6d536cf7dc86e2d7d56f59a178ac6c6238f52e"
    state: present

- name: "Install libselinux-python to allow file copy"
  become: yes
  yum:
    name: libselinux-python
    state: present

- name: "Add Docker yum repo"
  copy:
    src: "docker.repo"
    dest: /etc/yum.repos.d
    owner: root
    group: root

- name: "Install Docker package"
  become: yes
  yum:
    name: docker-engine
    update_cache: yes
    state: installed

## Storage?
    
# # enable
# # become systemctl enable docker.service
# # become systemctl start docker.service
# ~                                            

Use file copy for yum repo to make it indempotent.
Use file copy for yum repo to make it indempotent.
