mirror of
https://github.com/geerlingguy/ansible-role-docker.git
synced 2024-11-18 19:10:43 +01:00
Merge pull request #336 from crate-workbench/amo/allow-downgrades
Allow package downgrading
This commit is contained in:
commit
13c293fe8d
@ -5,12 +5,22 @@
|
|||||||
- include_tasks: setup-Debian.yml
|
- include_tasks: setup-Debian.yml
|
||||||
when: ansible_os_family == 'Debian'
|
when: ansible_os_family == 'Debian'
|
||||||
|
|
||||||
- name: Install Docker.
|
- name: Install Docker (Ansible <2.12).
|
||||||
package:
|
package:
|
||||||
name: "{{ docker_package }}"
|
name: "{{ docker_package }}"
|
||||||
state: "{{ docker_package_state }}"
|
state: "{{ docker_package_state }}"
|
||||||
notify: restart docker
|
notify: restart docker
|
||||||
ignore_errors: "{{ ansible_check_mode }}"
|
ignore_errors: "{{ ansible_check_mode }}"
|
||||||
|
when: "ansible_version.full is version_compare('2.12', '<')"
|
||||||
|
|
||||||
|
- name: Install Docker (Ansible >=2.12).
|
||||||
|
package:
|
||||||
|
name: "{{ docker_package }}"
|
||||||
|
state: "{{ docker_package_state }}"
|
||||||
|
allow_downgrade: true
|
||||||
|
notify: restart docker
|
||||||
|
ignore_errors: "{{ ansible_check_mode }}"
|
||||||
|
when: "ansible_version.full is version_compare('2.12', '>=')"
|
||||||
|
|
||||||
- name: Ensure /etc/docker/ directory exists.
|
- name: Ensure /etc/docker/ directory exists.
|
||||||
file:
|
file:
|
||||||
|
Loading…
Reference in New Issue
Block a user