diff --git a/molecule/default/playbook.yml b/molecule/default/playbook.yml index 645a7c7..dd93925 100644 --- a/molecule/default/playbook.yml +++ b/molecule/default/playbook.yml @@ -7,10 +7,9 @@ pre_tasks: - name: install packages for testing under docker apt: - name: "{{ item }}" + name: + - openssh-server state: present - with_items: - - openssh-server - name: pretask2 file: name: /boot/grub diff --git a/tasks/section2.yml b/tasks/section2.yml index 6e3cef6..a7507cd 100644 --- a/tasks/section2.yml +++ b/tasks/section2.yml @@ -325,11 +325,10 @@ - name: "SCORED | 2.2.2 | PATCH | Ensure X Window System is not installed" apt: - name: "{{ item }}" + name: + - "@X Window System" + - "x11*" state: absent - with_items: - - "@X Window System" - - "x11*" when: - not ubuntu1804cis_xwindows_required - ubuntu1804cis_rule_2_2_2