diff --git a/tasks/prelim.yml b/tasks/prelim.yml index d7b304e3..dc64a1ca 100644 --- a/tasks/prelim.yml +++ b/tasks/prelim.yml @@ -8,6 +8,19 @@ tags: - rule_1.1.1.2 - always + when: + - ubtu22cis_rule_1_1_1_2 + +- name: "PRELIM | Register if squashfs is built into the kernel" + ansible.builtin.shell: more /lib/modules/$(uname -r)/modules.builtin | grep -c "squashfs" + changed_when: false + failed_when: squashfs_builtin.rc not in [ 0, 1 ] + register: squashfs_builtin + tags: + - rule_1.1.1.2 + - always + when: + - ubtu22cis_rule_1_1_1_2 - name: "PRELIM | Section 1.1 | Create list of mount points" ansible.builtin.set_fact: diff --git a/tasks/section_1/cis_1.1.1.x.yml b/tasks/section_1/cis_1.1.1.x.yml index bbe06bfd..806b2800 100644 --- a/tasks/section_1/cis_1.1.1.x.yml +++ b/tasks/section_1/cis_1.1.1.x.yml @@ -56,7 +56,8 @@ when: ansible_connection != 'docker' when: - ubtu22cis_rule_1_1_1_2 - - snap_pkg_mgr.stdout | length == 0 + - snap_pkg_mgr.stdout == "0" + - squashfs_builtin.stdout == "0" tags: - level2-server - level2-workstation