ansible / ansible.builtin / v2.5.11 / module / alternatives Manages alternative programs for common commands | "added in version" 1.6 of ansible.builtin" Authors: David Wittman (@DavidWittman), Gabe Mulley (@mulby) preview | supported by communityansible.builtin.alternatives (v2.5.11) — module
pip
Install with pip install ansible==2.5.11
Manages symbolic links using the 'update-alternatives' tool
Useful when multiple programs are installed but provide similar functionality (e.g. different editors).
- name: correct java version selected alternatives: name: java path: /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java
- name: alternatives link created alternatives: name: hadoop-conf link: /etc/hadoop/conf path: /etc/hadoop/conf.ansible
- name: make java 32 bit an alternative with low priority alternatives: name: java path: /usr/lib/jvm/java-7-openjdk-i386/jre/bin/java priority: -10
link: description: - The path to the symbolic link that should point to the real executable. - This option is always required on RHEL-based distributions. On Debian-based distributions this option is required when the alternative I(name) is unknown to the system. required: false name: description: - The generic name of the link. required: true path: description: - The path to the real executable that the link should point to. required: true priority: default: 50 description: - The priority of the alternative required: false version_added: '2.2' version_added_collection: ansible.builtin