Skip to content

Commit

Permalink
Merge pull request #13 from locationlabs/distribution-name-in-version
Browse files Browse the repository at this point in the history
Add distribution name for docker 1.12.4+
  • Loading branch information
charness authored Feb 15, 2017
2 parents eb9be1c + fe1ed01 commit 26196b8
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion tasks/docker-engine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,21 @@
# i.e. if there's a -0 and a -1 we'll get -1.
#
# Reference: https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Version
#
# Beginning with Docker 1.12.4, the version includes the distribution name:
#
# 1.12.4-0~ubuntu-trusty
#
# Include the distribution name as needed
- name: Install Docker Engine
apt:
name: "docker-engine={{ docker_version }}-*~{{ ansible_distribution_release }}"
name: "docker-engine={{ docker_version }}-*~{{
docker_version
| version_compare('1.12.4', '>=')
| ternary(ansible_distribution + '-', '')
}}{{
ansible_distribution_release
}}"
state: present
register: r_docker_package_install
when: not check_mode

0 comments on commit 26196b8

Please sign in to comment.