From a0abefbc29f01efa0860e7b2ca18cdb7b0744ecd Mon Sep 17 00:00:00 2001 From: Martin Schurz Date: Sun, 4 Feb 2024 21:50:41 +0100 Subject: [PATCH] use loop for package names Signed-off-by: Martin Schurz --- molecule/os_hardening_vm/prepare.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/molecule/os_hardening_vm/prepare.yml b/molecule/os_hardening_vm/prepare.yml index 1199984a..bbd4de0b 100644 --- a/molecule/os_hardening_vm/prepare.yml +++ b/molecule/os_hardening_vm/prepare.yml @@ -24,11 +24,12 @@ - name: Block update of Grub and kernel, because of error ansible.builtin.dpkg_selections: - name: - - grub-pc - - linux-image-generic + name: "{{ item }}" selection: hold when: ansible_os_family == 'Debian' + loop: + - grub-pc + - linux-image-generic - name: Run the equivalent of "apt-get update && apt-get upgrade" ansible.builtin.apt: