Skip to content

Commit

Permalink
Ubuntu 16.04 requires dmsetup to be installed before docker.
Browse files Browse the repository at this point in the history
Otherwise dpkg cannot install docker (installation hangs)
See details here: moby/moby#23347
  • Loading branch information
DG0lden authored and angstwad committed Oct 19, 2016
1 parent 7d0e0ec commit 9f8d45e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions defaults/main.yml
Expand Up @@ -45,6 +45,7 @@ update_docker_package: no
# Change these to 'present' if you're running Ubuntu 12.04-13.10 and are fine with less-than-latest packages
kernel_pkg_state: latest
cgroup_lite_pkg_state: latest
dmsetup_pkg_state: latest
# Force an install of the kernel extras, in case you're suffering from some issue related to the
# static binary provided by upstream Docker. For example, see this GitHub Issue in Docker:
# https://github.com/docker/docker/issues/12750
Expand Down
14 changes: 14 additions & 0 deletions tasks/kernel_check_and_update.yml
Expand Up @@ -63,3 +63,17 @@
state: started
when: "(ansible_distribution_version|version_compare(12.04, '=') and reboot_result|changed)
or (ansible_distribution_version|version_compare(13.10, '=') and cgroup_lite_result|changed)"

# Fix for https://github.com/docker/docker/issues/23347
- name: Install dmsetup for Ubuntu 16.04
apt:
pkg: dmsetup
state: "{{ dmsetup_pkg_state }}"
update_cache: yes
cache_valid_time: 600
register: dmsetup_result
when: "ansible_distribution_version|version_compare(16.04, '=')"

- name: Run dmsetup for Ubuntu 16.04
command: dmsetup mknodes
when: dmsetup_result

0 comments on commit 9f8d45e

Please sign in to comment.