ansible-lockdown / RHEL7-CIS

Ansible role for Red Hat 7 CIS Baseline
https://ansible-lockdown.readthedocs.io/en/latest/
MIT License
473 stars 303 forks source link

Task validation fixes (by Steampunk Spotter) #321

Closed anzoman closed 1 year ago

anzoman commented 1 year ago

Overall Review of Changes: These changes will try to correct some errors and warnings within Ansible tasks that I have come across when running some checks with Steampunk Spotter.

Enhancements: These changes fix the following errors detected by the Spotter CLI:

(.venv) user@ubuntu:~/RHEL7-CIS$ spotter scan --ansible-version 2.12 --display-level error .
Scanning...success. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00
------------------------------------------------------------------------
tasks/check_prereqs.yml:3:3: ERROR: [E001] list is not a valid parameter in module ansible.builtin.package.
tasks/check_prereqs.yml:3:3: ERROR: [E005] name is a required parameter in module ansible.builtin.package.
tasks/post.yml:4:3: ERROR: [E001] autoremove is not a valid parameter in module ansible.builtin.package.
tasks/post.yml:4:3: ERROR: [E005] name is a required parameter in module ansible.builtin.package.
tasks/post.yml:4:3: ERROR: [E005] state is a required parameter in module ansible.builtin.package.
tasks/pre_remediation_audit.yml:67:9: ERROR: [E005] that is a required parameter in module ansible.builtin.assert.
tasks/section_1/cis_1.2.x.yml:76:3: ERROR: [E001] masked is not a valid parameter in module ansible.builtin.service.
tasks/section_5/cis_5.7.yml:12:9: ERROR: [E001] groups is not a valid parameter in module ansible.builtin.group.
------------------------------------------------------------------------
Spotter took 2.068 s to scan your input.
It resulted in 9 error(s), 162 warning(s) and 181 hint(s).
Overall status: ERROR

How has this been tested?: N/A

uk-bolly commented 1 year ago

hi @anzoman

Thank you again for your work on this and the great comms. I have just noted that you last push is not meeting DCO requirements apart from that i am happy to approve.

thanks again

uk-bolly