Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing precondition for rule 1.1.1.2 #113

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions tasks/prelim.yml
uk-bolly marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI: This is causing things to hang when running via Packer/Ansible. Likely due to more instead of say cat

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tomi-bigpi: This PR has already been merged ... could you open an issue about this behavior? Sorry, that I broke something :(

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:
Expand Down
3 changes: 2 additions & 1 deletion tasks/section_1/cis_1.1.1.x.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down