# platform = multi_platform_all
# reboot = false
# strategy = configure
# complexity = low
# disruption = low









- name: Find /etc/audit/rules.d/ file(s)
  ansible.builtin.command: 'find -P /etc/audit/rules.d/ -maxdepth 1 -perm /u+xs,g+xwrs,o+xwrt  -type f -regextype posix-extended -regex "^.*rules$"'
  register: files_found
  changed_when: False
  failed_when: False
  check_mode: no

- name: Set permissions for /etc/audit/rules.d/ file(s)
  ansible.builtin.file:
    path: "{{ item }}"
    mode: "u-xs,g-xwrs,o-xwrt"
    state: "file"
  with_items:
    - "{{ files_found.stdout_lines }}"


