ansible-lockdown / AMAZON2023-CIS

Ansible role for Amazon2023 CIS Baseline
https://ansible-lockdown.readthedocs.io/en/latest/
MIT License
24 stars 18 forks source link

Adding empty iterator in case `auditd_conf_files` register is empty o… #60

Closed DianaMariaDDM closed 5 months ago

DianaMariaDDM commented 6 months ago

…r undefined.

Overall Review of Changes: This PR hold the solution for this issue.

Issue Fixes:

Enhancements: None

How has this been tested?: Tested locally.

uk-bolly commented 6 months ago

hi @DianaMariaDDM

Thank you for this PR, not sure why this is currently failing but didn't fail in the pipeline for updtes you have already applied. It seems it is not discover virtualization_type for some reason. If you wanted can you try this in the tasks/main.yml and see if this works rather than me raising fixing and you having to sync again.

line 45 /tasks/main.yml

ansible_connection == 'docker' or ( ansible_virtualization_type is defined and
        ansible_virtualization_type in ["docker", "lxc", "openvz", "podman", "container"])

Many thanks

uk-bolly

DianaMariaDDM commented 6 months ago

I added the fix in a new commit. Unfortunately, now there is another error that appears to be originating from tasks/LE_audit_setup.yml.