---
- name: remove docker.io
  apt: name=docker.io state=absent
  when: universe_installed

- name: Add upstream apt key
  apt_key: id=36A1D7869245C8950F966E92D8576A8BA88D21E9 keyserver=keyserver.ubuntu.com

- name: Add Upstream apt repository
  apt_repository: repo='deb https://get.docker.com/ubuntu docker main' state=present

- debug: msg="Installing latest"

- name: Install required packages.
  apt: name={{ item }}={{ version }} state=present update_cache=yes
  with_items:
    - lxc-docker

---
- name: remove docker.io
  apt: name=docker.io state=absent
  when: universe_installed

- name: Add upstream apt key
  apt_key: id=36A1D7869245C8950F966E92D8576A8BA88D21E9 keyserver=keyserver.ubuntu.com

- name: Add Upstream apt repository
  apt_repository: repo='deb https://get.docker.com/ubuntu docker main' state=present

- debug: msg="Installing latest"

- name: Install required packages.
  apt: name=lxc-docker-{{ version }} state=present update_cache=yes

Refactor the apt statement to use proper string interpolation
Refactor the apt statement to use proper string interpolation
