Force install of specified docker version, fixes #295
This allows Ubuntu/Debian to downgrade Docker version if a newer version is installed, instead of failing.
This commit is contained in:
parent
153b82a803
commit
33d897bcb6
8 changed files with 12 additions and 8 deletions
|
@ -48,7 +48,8 @@
|
|||
- name: ensure docker packages are installed
|
||||
action: "{{ docker_package_info.pkg_mgr }}"
|
||||
args:
|
||||
pkg: "{{item}}"
|
||||
pkg: "{{item.name}}"
|
||||
force: "{{item.force|default(omit)}}"
|
||||
state: present
|
||||
with_items: "{{ docker_package_info.pkgs }}"
|
||||
when: (ansible_os_family != "CoreOS") and (docker_package_info.pkgs|length > 0)
|
||||
|
|
|
@ -5,7 +5,7 @@ docker_kernel_min_version: '2.6.32-431'
|
|||
docker_package_info:
|
||||
pkg_mgr: yum
|
||||
pkgs:
|
||||
- docker-io
|
||||
- name: docker-io
|
||||
|
||||
docker_repo_key_info:
|
||||
pkg_key: ''
|
||||
|
|
|
@ -9,7 +9,8 @@ docker_versioned_pkg:
|
|||
docker_package_info:
|
||||
pkg_mgr: apt
|
||||
pkgs:
|
||||
- "{{ docker_versioned_pkg[docker_version] }}"
|
||||
- name: "{{ docker_versioned_pkg[docker_version] }}"
|
||||
force: yes
|
||||
|
||||
docker_repo_key_info:
|
||||
pkg_key: apt_key
|
||||
|
|
|
@ -5,7 +5,7 @@ docker_kernel_min_version: '0'
|
|||
docker_package_info:
|
||||
pkg_mgr: yum
|
||||
pkgs:
|
||||
- docker-io
|
||||
- name: docker-io
|
||||
|
||||
docker_repo_key_info:
|
||||
pkg_key: ''
|
||||
|
|
|
@ -8,7 +8,7 @@ docker_versioned_pkg:
|
|||
docker_package_info:
|
||||
pkg_mgr: dnf
|
||||
pkgs:
|
||||
- "{{ docker_versioned_pkg[docker_version] }}"
|
||||
- name: "{{ docker_versioned_pkg[docker_version] }}"
|
||||
|
||||
docker_repo_key_info:
|
||||
pkg_key: ''
|
||||
|
|
|
@ -3,7 +3,7 @@ docker_kernel_min_version: '0'
|
|||
docker_package_info:
|
||||
pkg_mgr: yum
|
||||
pkgs:
|
||||
- docker-engine
|
||||
- name: docker-engine
|
||||
|
||||
docker_repo_key_info:
|
||||
pkg_key: ''
|
||||
|
|
|
@ -10,7 +10,8 @@ docker_versioned_pkg:
|
|||
docker_package_info:
|
||||
pkg_mgr: apt
|
||||
pkgs:
|
||||
- "{{ docker_versioned_pkg[docker_version] }}"
|
||||
- name: "{{ docker_versioned_pkg[docker_version] }}"
|
||||
force: yes
|
||||
|
||||
docker_repo_key_info:
|
||||
pkg_key: apt_key
|
||||
|
|
|
@ -10,7 +10,8 @@ docker_versioned_pkg:
|
|||
docker_package_info:
|
||||
pkg_mgr: apt
|
||||
pkgs:
|
||||
- "{{ docker_versioned_pkg[docker_version] }}"
|
||||
- name: "{{ docker_versioned_pkg[docker_version] }}"
|
||||
force: yes
|
||||
|
||||
docker_repo_key_info:
|
||||
pkg_key: apt_key
|
||||
|
|
Loading…
Reference in a new issue