# platform = multi_platform_all
# reboot = false
# strategy = configure
# complexity = low
# disruption = low
- name: Check that the syslog group is defined
  ansible.builtin.getent:
    database: group
    key: syslog
  ignore_errors: yes
  when: file_groupowner_var_log_newgroup is undefined

- name: Set the file_groupowner_var_log_newgroup variable if syslog found
  ansible.builtin.set_fact:
    file_groupowner_var_log_newgroup: "syslog"
  when: ansible_facts.getent_group["syslog"] is defined

- name: Ensure group owner on /var/log/
  ansible.builtin.file:
    path: "/var/log/"
    follow: false
    state: directory

    group: "{{ file_groupowner_var_log_newgroup }}"



