- template:
    src: dummy_alternative
    dest: '{{ alternatives_dir }}/dummy'
    owner: root
    group: root
    mode: '0644'
  when: with_alternatives or ansible_os_family != 'RedHat'
- file:
    path: '{{ alternatives_dir }}/dummy'
    state: absent
  when: not with_alternatives and ansible_os_family == 'RedHat'