diff --git a/meta/main.yml b/meta/main.yml
index 277f5a3d8e6d4cff731c21f9f47e5e60e327f2b8..097c60d7491211bca6e35d419018abbc566d81c8 100644
--- a/meta/main.yml
+++ b/meta/main.yml
@@ -8,5 +8,6 @@ galaxy_info:
     - name: Ubuntu
       versions:
         - all
-dependencies: []
-  # - elasticsearch
+dependencies:
+  - role: geerlingguy.docker
+    when: gitlab_enable_plantuml
diff --git a/tasks/plantuml.yml b/tasks/plantuml.yml
index b07e99bd3e9dd4397ff1d85add4b80c4af58ac17..2818fe68f396ac39d5dceb41161f3a3444241052 100644
--- a/tasks/plantuml.yml
+++ b/tasks/plantuml.yml
@@ -2,30 +2,6 @@
 - name: Install prerequisites for docker
   ansible.builtin.apt:
     name:
-      - apt-transport-https
-      - ca-certificates
-      - curl
-      - gnupg-agent
-      - software-properties-common
-    state: present
-    update_cache: true
-
-- name: Add docker key
-  ansible.builtin.apt_key:
-    url: https://download.docker.com/linux/ubuntu/gpg
-    state: present
-
-- name: Add docker repo
-  ansible.builtin.apt_repository:
-    repo: "deb [arch=amd64] https://download.docker.com/linux/ubuntu {{ ansible_lsb.codename }} stable"
-    state: present
-
-- name: Install prerequisites for docker
-  ansible.builtin.apt:
-    name:
-      - docker-ce
-      - docker-ce-cli
-      - containerd.io
       - python3-docker
     state: present
     update_cache: true