ansible-lockdown / RHEL9-CIS

Ansible role for Red Hat 9 CIS Baseline
https://ansible-lockdown.readthedocs.io
MIT License
113 stars 86 forks source link

DEPRECATION WARNING is generating when play task `6.1.11 | AUDIT | Ensure no ungrouped files or directories exist` #168

Closed Illibur closed 6 months ago

Illibur commented 7 months ago

Feature Request or Enhancement

Summary of Request I want to not get any warnings after playing task 6.1.11 | AUDIT | Ensure no ungrouped files or directories exist

Currently this is the output: [DEPRECATION WARNING]: Specifying a list of dictionaries for vars is deprecated in favor of specifying a dictionary. This feature will be removed in version 2.18.

Describe Alternatives You've Considered As an alternative solution this tip could be used: Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg. But it doesn't solve the problem.

Suggested Code To do that the list of dictionaries on line https://github.com/Illibur/RHEL9-CIS/blob/devel/tasks/section_6/cis_6.1.x.yml#L233 should be replaced with using a dictionary

  vars:
      - rhel_09_6_1_11_ungrouped_files_found: false

change into:

  vars:
      rhel_09_6_1_11_ungrouped_files_found: false
RoboPickle commented 6 months ago

Thanks Illibur. That was bugging me too. I can roll that into my #177 PR.