You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/test/integration/targets/alternatives/tasks/setup_test.yml

23 lines
640 B
YAML

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

- template:
src: dummy_alternative
dest: '{{ alternatives_dir }}/dummy'
owner: root
group: root
mode: 0644
when: with_alternatives or ansible_os_family != 'RedHat'
# update-alternatives included in Fedora 26 (1.10) & Red Hat 7.4 (1.8) segfaults
# when <admindir>/dummy file contains only mode and link. Hence the file is
# deleted instead of containing only mode and link. The file below works fine with
# newer version of update-alternatives:
# """
# auto
# /usr/bin/dummy
#
#
# """
- file:
path: '{{ alternatives_dir }}/dummy'
state: absent
when: not with_alternatives and ansible_os_family == 'RedHat'