ansible-lockdown / RHEL9-STIG

Ansible playbook for RHEL9 Disa STIG
MIT License
10 stars 10 forks source link

RHEL-09-232190 fails with undefined variable #42

Closed layluke closed 6 days ago

layluke commented 1 week ago

Describe the Issue RHEL-09-232190 fails with undefined variable

fatal: [rhel9stig-test]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'path' is undefined. 'path' is undefined\n\nThe error appears to be in 'RHEL9-STIG/tasks/Cat2/RHEL-09-23xxxx.yml': line 1538, column 7, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n - name: \"RHEL-09-232190 | PATCH | RHEL 9 system commands must be owned by root.\"\n ^ here\n"}

Expected Behavior Patch task for RHEL-09-232190 to be able to properly proper parse "path" attribute for registered variable rhel9stig_sys_commands_owner

Actual Behavior Not finding "path" attributes for registered rhel9stig_sys_commands_owner variable

Control(s) Affected RHEL-09-232190

Environment (please complete the following information):

branch being used: devel Ansible Version: 2.15.1 Host Python Version: Python 3.11 Ansible Server Python Version: Python 3.9 Additional Details:

Possible Solution was able to get over this by adding loop control and using item instead of path