summaryrefslogtreecommitdiff
path: root/roles
diff options
context:
space:
mode:
Diffstat (limited to 'roles')
-rw-r--r--roles/docker/engine/defaults/main.yml17
-rw-r--r--roles/docker/engine/tasks/main.yml7
2 files changed, 15 insertions, 9 deletions
diff --git a/roles/docker/engine/defaults/main.yml b/roles/docker/engine/defaults/main.yml
index f6302d2b..c6745dc9 100644
--- a/roles/docker/engine/defaults/main.yml
+++ b/roles/docker/engine/defaults/main.yml
@@ -6,16 +6,23 @@ _docker_pkg_name_map_:
distro: docker.io
docker-com: docker-ce
-_docker_buildx_pkg_name_map_:
- distro: docker-buildx ## TODO: only works for ubuntu since debian currently has no package for buildx
- docker-com: docker-buildx-plugin
+_docker_plugin_pkg_name_map_:
+ distro:
+ buildx: docker-buildx ## TODO: only works for ubuntu since debian currently has no packages
+ compose: docker-compose-v2 ## for these plugins
+ docker-com:
+ buildx: docker-buildx-plugin
+ compose: docker-compose-plugin
docker_pkg_provider: distro
# docker_pkg_provider: docker-com
-docker_install_buildx: no
+docker_plugins: []
+# - buildx
+# - compose
+
docker_pkg_name: "{{ _docker_pkg_name_map_[docker_pkg_provider] }}"
-docker_buildx_pkg_name: "{{ _docker_buildx_pkg_name_map_[docker_pkg_provider] }}"
+docker_plugin_pkg_names: "{{ _docker_plugin_pkg_name_map_[docker_pkg_provider] }}"
# docker_pkg_version:
diff --git a/roles/docker/engine/tasks/main.yml b/roles/docker/engine/tasks/main.yml
index 4619f12b..cf879631 100644
--- a/roles/docker/engine/tasks/main.yml
+++ b/roles/docker/engine/tasks/main.yml
@@ -49,11 +49,10 @@
state: present
allow_downgrade: yes
-- name: install buildx plugin
- when: docker_install_buildx
+- name: install docker plugin
+ when: (docker_plugins | length) > 0
apt:
- name:
- - "{{ docker_buildx_pkg_name }}"
+ name: "{{ docker_plugins | map('extract', docker_plugin_pkg_names) | list }}"
state: present
## TODO: for now this is only needed on Debian Bullseye and beyond