ansible-lockdown / RHEL9-CIS

Ansible role for Red Hat 9 CIS Baseline

Home Page:https://ansible-lockdown.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

Illibur opened this issue · comments

Feature Request or Enhancement

  • Enhancement [x]

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

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