ansible / ansible.builtin / v2.9.0 / 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.9.0) — module
pip
Install with pip install ansible==2.9.0
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. type: path name: description: - The generic name of the link. required: true type: str path: description: - The path to the real executable that the link should point to. required: true type: path priority: default: 50 description: - The priority of the alternative. type: int version_added: '2.2' version_added_collection: ansible.builtin