Skip to content

Commit

Permalink
Explicitly install cli package
Browse files Browse the repository at this point in the history
The docker-ce package depends on docker-ce-cli unconstrained, this
can lead to problems where the cli package is too new to communicate
with the daemon. This patch adds an explicit install task for the
cli package, so that it's version can be overridden if necessary.

Related conjurinc/ops#569
  • Loading branch information
hughsaunders authored and angstwad committed Jun 8, 2020
1 parent e57e367 commit 324e8bf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ docker_apt_channel: stable

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

Expand Down
8 changes: 8 additions & 0 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,14 @@
state: present
environment: "{{ proxy_env if proxy_env is defined else {} }}"

- name: Install (or update) docker-cli package
apt:
name: "{{ docker_cli_pkg_name }}"
state: "{{ 'latest' if update_docker_package else 'present' }}"
update_cache: "{{ update_docker_package }}"
cache_valid_time: "{{ docker_apt_cache_valid_time }}"
environment: "{{ proxy_env if proxy_env is defined else {} }}"

- name: Install (or update) docker package
apt:
name: "{{ docker_pkg_name }}"
Expand Down

0 comments on commit 324e8bf

Please sign in to comment.