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









- name: Find /var/log/ file(s) recursively
  ansible.builtin.command: 'find -P /var/log/  -perm /u+xs,g+xws,o+xwrt ! -name "history.log*" ! -name "eipp.log.xz*" ! -name "[bw]tmp" ! -name "[bw]tmp.*" ! -name "[bw]tmp-*" ! -name "lastlog" ! -name "lastlog.*" -type f -regextype posix-extended -regex ".*"'
  register: files_found
  changed_when: False
  failed_when: False
  check_mode: no

- name: Set permissions for /var/log/ file(s)
  ansible.builtin.file:
    path: "{{ item }}"
    mode: "u-xs,g-xws,o-xwrt"
    state: "file"
  with_items:
    - "{{ files_found.stdout_lines }}"


