Skip to content

Commit

Permalink
When installing docker package, pass "--force-confnew", so that config
Browse files Browse the repository at this point in the history
files are replaced even if they have been modified.
  • Loading branch information
Oliver Stacey committed Oct 24, 2016
1 parent aaa1535 commit 760fc0b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
Version 2.1.2:
- Pass the "--force-confnew" flag to dpkg when installing the Docker package, to make
sure configuration files are replaced even if they have been edited.

Version 2.1.1:
- Stop the "docker" service before attempting a package upgrade, to prevent an intermittent
upgrade failure.
Expand Down
6 changes: 5 additions & 1 deletion tasks/docker-engine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
register: collect_container_configs_result
when: "{{ docker_exec_stat_result.stat.exists
and docker_attempt_upgrade_fixes }}"
always_run: True

# It should be OK to just run the apt install of the new docker package, regardless of the
# state of docker. However, there's an issue that sometimes occurs in that case, where the
Expand All @@ -58,7 +59,10 @@
when: "{{ docker_exec_stat_result.stat.exists and installed_docker_version != docker_version }}"

- name: Install Docker Engine
apt: name="docker-engine={{ docker_version }}-0~{{ ansible_distribution_release }}" state=present
apt:
name: "docker-engine={{ docker_version }}-0~{{ ansible_distribution_release }}"
state: present
dpkg-options: "force-confnew"
register: docker_engine_install

# Some updates will break data volumes. There are two issues:
Expand Down

0 comments on commit 760fc0b

Please sign in to comment.