From 943a5627360a42578d8c3d92cfe013f706ff8128 Mon Sep 17 00:00:00 2001
From: Robin Sonnabend <robin@fsmpi.rwth-aachen.de>
Date: Wed, 17 Oct 2018 17:02:16 +0200
Subject: [PATCH] Remove with_items from apt

---
 ad-auth/tasks/sssd.yml       | 24 +++++++++++++-----------
 lvm-snapshots/tasks/main.yml |  9 +++++----
 nfs-client/tasks/main.yml    | 22 ++++++++++++----------
 nfs-server/tasks/main.yml    | 15 ++++++++-------
 4 files changed, 38 insertions(+), 32 deletions(-)

diff --git a/ad-auth/tasks/sssd.yml b/ad-auth/tasks/sssd.yml
index 3d65f58..ca61377 100644
--- a/ad-auth/tasks/sssd.yml
+++ b/ad-auth/tasks/sssd.yml
@@ -2,17 +2,19 @@
 # file: roles/ad-auth/tasks/sssd.yml
 
 - name: ensure sssd is installed
-  apt: name="{{ item }}" state=present install_recommends=no
-  with_items:
-    - sssd
-    - libpam-sss
-    - libnss-sss
-    - sssd-tools
-    - realmd
-    - policykit-1 # this is required for realm to discover realms...
-    - adcli # this is required for realm to join realms...
-    - packagekit # this is required for realm to i don't know and don't even care anymore...
-    - cracklib-runtime
+  apt:
+    name:
+      - sssd
+      - libpam-sss
+      - libnss-sss
+      - sssd-tools
+      - realmd
+      - policykit-1 # this is required for realm to discover realms...
+      - adcli # this is required for realm to join realms...
+      - packagekit # this is required for realm to i don't know and don't even care anymore...
+      - cracklib-runtime
+    state: present
+    install_recommends: no
   notify:
     - clear sssd cache
   tags:
diff --git a/lvm-snapshots/tasks/main.yml b/lvm-snapshots/tasks/main.yml
index 96cdb65..d825178 100644
--- a/lvm-snapshots/tasks/main.yml
+++ b/lvm-snapshots/tasks/main.yml
@@ -65,10 +65,11 @@
     - lvm-snapshots
 
 - name: ensure the necessary programs are installed
-  apt: name="{{item}}" state=present
-  with_items:
-    - python3
-    - virtualenv
+  apt:
+    name:
+      - python3
+      - virtualenv
+    state: present
   tags:
     - packages
     - lvm-snapshots
diff --git a/nfs-client/tasks/main.yml b/nfs-client/tasks/main.yml
index 354ad23..51ee58d 100644
--- a/nfs-client/tasks/main.yml
+++ b/nfs-client/tasks/main.yml
@@ -2,21 +2,23 @@
 # file: roles/nfs-client/tasks/main.yml
 
 - name: ensure nfs client utils are installed
-  apt: name="{{ item }}" state=present
-  with_items:
-    - nfs-common
-    - libgssrpc4
-    - librpcsecgss3
-    - autofs
+  apt:
+    name:
+      - nfs-common
+      - libgssrpc4
+      - librpcsecgss3
+      - autofs
+    state: present
   tags:
     - nfs-client
     - packages
 
 - name: ensure cifs client utils are installed
-  apt: name="{{ item }}" state=present
-  with_items:
-    - cifs-utils
-    - smbclient
+  apt:
+    name:
+      - cifs-utils
+      - smbclient
+    state: present
   when: nfs_enable_cifs
   tags:
     - nfs-client
diff --git a/nfs-server/tasks/main.yml b/nfs-server/tasks/main.yml
index d4f74eb..1903d61 100644
--- a/nfs-server/tasks/main.yml
+++ b/nfs-server/tasks/main.yml
@@ -2,13 +2,14 @@
 # file: roles/nfs-server/tasks/main.yml
 
 - name: ensure nfs server utils are installed
-  apt: name="{{ item }}" state=present
-  with_items:
-    - nfs-common
-    - nfs-kernel-server
-    - msktutil
-    - librpcsecgss3
-    - libgssrpc4
+  apt:
+    name:
+      - nfs-common
+      - nfs-kernel-server
+      - msktutil
+      - librpcsecgss3
+      - libgssrpc4
+    state: present
   tags:
     - nfs-server
     - packages
-- 
GitLab