# File processed by the build system, i.e. retrieved from the build/rhel7/fixes/ansible/file_owner_grub2_cfg.yml
#
# platform = multi_platform_all
# reboot = false
# strategy = configure
# complexity = low
# disruption = low
- name: Test for existence /boot/grub2/grub.cfg in name of {{{ rule_id }}}
  stat:
    path: /boot/grub2/grub.cfg
  register: file_exists

- name: "{{{ rule_title }}}: Ensure owner 0 on /boot/grub2/grub.cfg"
  file:
    path: /boot/grub2/grub.cfg
    owner: 0
  when: file_exists.stat.exists
