Skip to content

Commit

Permalink
add docker-ce support
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Durivage committed Jul 10, 2017
1 parent b815e60 commit 44ba18f
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 7 deletions.
19 changes: 13 additions & 6 deletions defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
---
# docker-engine is the default package name
docker_pkg_name: docker-engine
# uninstall previous versions of docker, but not by default
# https://docs.docker.com/engine/installation/linux/docker-ce/ubuntu/#uninstall-old-versions
uninstall_previous_docker_versions: false

# assume that the desired version is community edition
docker_edition: ce

# docker-ce is the default package name
docker_pkg_name: "{{ 'docker-ee' if docker_edition == 'ee' else 'docker-ce' }}"
docker_apt_cache_valid_time: 600
docker_aufs_enabled: true

Expand All @@ -10,11 +17,11 @@ docker_defaults_file_path: /etc/default/docker
# Important if running Ubuntu 12.04-13.10 and ssh on a non-standard port
ssh_port: 22
# Place to get apt repository key
apt_key_url: hkp:https://p80.pool.sks-keyservers.net:80
apt_key_url: https:https://download.docker.com/linux/ubuntu/gpg
# apt repository key signature
apt_key_sig: 58118E89F3A912897C070ADBF76221572C52609D
# Name of the apt repository for docker
apt_repository: deb https://apt.dockerproject.org/repo {{ ansible_lsb.id|lower }}-{{ ansible_lsb.codename|lower }} main
apt_key_sig: 9DC858229FC7DD38854AE2D88D81803C0EBFCD88
# Name of the apt repository for classic docker or edition docker
apt_repository: "deb [arch=amd64] https://download.docker.com/linux/ubuntu {{ ansible_lsb.codename|lower }} stable"
# The following help expose a docker port or to add additional options when
# running docker daemon. The default is to not use any special options.
#docker_opts: >
Expand Down
10 changes: 10 additions & 0 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,16 @@
include: kernel_check_and_update.yml
when: kernel_update_and_reboot_permitted or install_kernel_extras

- name: Uninstall old versions of Docker
apt:
name: "{{ item }}"
state: absent
with_items:
- docker
- docker-engine
- docker.io
when: uninstall_previous_docker_versions

# Fix for https://github.com/docker/docker/issues/23347
- name: Install dmsetup for Ubuntu 16.04
apt:
Expand Down
2 changes: 1 addition & 1 deletion templates/docker.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[Service]
ExecStart=
ExecStart=/usr/bin/docker daemon -H fd:https:// $DOCKER_OPTS
ExecStart=/usr/bin/dockerd -H fd:https:// $DOCKER_OPTS

0 comments on commit 44ba18f

Please sign in to comment.