diff --git a/tasks/prepare.yml b/tasks/prepare.yml
index 48c07fd4622c150bf2f998155a522d23a1c0fdfa..b03bfe48fc81e212ea847308c5503288801770d1 100644
--- a/tasks/prepare.yml
+++ b/tasks/prepare.yml
@@ -3,23 +3,24 @@
 
 - name: "Install required packages"
   apt:
-    pkg: '{{ item }}'
+    pkg: '{{ packages }}'
     state: 'present'
     update_cache: yes
-  with_items:
-    - 'zlib1g-dev'
-    - 'gcc'
-    - 'make'
-    - 'git'
-    - 'autoconf'
-    - 'autogen'
-    - 'automake'
-    - 'pkg-config'
-    - 'uuid-dev'
-    - 'python-dev'
-    - 'python-yaml'
-    - 'python3-dev'
-    - 'librsync-dev'
+  vars:
+    packages:
+      - 'zlib1g-dev'
+      - 'gcc'
+      - 'make'
+      - 'git'
+      - 'autoconf'
+      - 'autogen'
+      - 'automake'
+      - 'pkg-config'
+      - 'uuid-dev'
+      - 'python-dev'
+      - 'python-yaml'
+      - 'python3-dev'
+      - 'librsync-dev'
 
 - name: "Remove existing components"
   file: