mirror of
https://github.com/Maks1mS/ansible-role-docker.git
synced 2025-10-09 05:57:15 +03:00
add installation of docker plugin from repo
This commit is contained in:
@@ -22,6 +22,23 @@
|
||||
ignore_errors: "{{ ansible_check_mode }}"
|
||||
when: "ansible_version.full is version_compare('2.12', '>=') and ansible_os_family in ['RedHat', 'Debian']"
|
||||
|
||||
- name: Install docker-compose plugin.
|
||||
package:
|
||||
name: "{{ docker_compose_package }}"
|
||||
state: "{{ docker_compose_package_state }}"
|
||||
notify: restart docker
|
||||
ignore_errors: "{{ ansible_check_mode }}"
|
||||
when: "docker_install_compose_plugin | bool == true and (ansible_version.full is version_compare('2.12', '<') or ansible_os_family not in ['RedHat', 'Debian'])"
|
||||
|
||||
- name: Install docker-compose-plugin (with downgrade option).
|
||||
package:
|
||||
name: "{{ docker_compose_package }}"
|
||||
state: "{{ docker_compose_package_state }}"
|
||||
allow_downgrade: true
|
||||
notify: restart docker
|
||||
ignore_errors: "{{ ansible_check_mode }}"
|
||||
when: "docker_install_compose_plugin | bool == true and ansible_version.full is version_compare('2.12', '>=') and ansible_os_family in ['RedHat', 'Debian']"
|
||||
|
||||
- name: Ensure /etc/docker/ directory exists.
|
||||
file:
|
||||
path: /etc/docker
|
||||
|
Reference in New Issue
Block a user