---
- name: Ensure apt-transport-https is installed
  apt:
    name=apt-transport-https
    update_cache=yes
    state=present

- name: Add Docker repository key to local key chain
  apt_key:
    keyserver=hkp://keyserver.ubuntu.com:80
    id=36A1D7869245C8950F966E92D8576A8BA88D21E9
    state=present

- name: Add Docker repository to apt sources
  apt_repository:
    repo='deb https://get.docker.io/ubuntu docker main'
    state=present

- name: Ensure docker is installed
  apt:
    name=lxc-docker
    update_cache=yes
    state=present


---
- name: Ensure apt-transport-https is installed
  apt:
    name=apt-transport-https
    update_cache=yes
    state=present

- name: Add Docker repository key to local key chain
  apt_key:
    keyserver=hkp://keyserver.ubuntu.com:80
    id=36A1D7869245C8950F966E92D8576A8BA88D21E9
    state=present

- name: Add Docker repository to apt sources
  apt_repository:
    repo='deb https://get.docker.io/ubuntu docker main'
    state=present

- name: Ensure docker is installed
  apt:
    name=lxc-docker
    update_cache=yes
    state=present

- name: Create docker group
  group:
    name=docker
    state=present

- name: Add host VM user to docker group
  user:
    name=vagrant
    append=yes
    groups=docker


Add vagrant VM user to docker group
Add vagrant VM user to docker group
