community / community.general / 1.3.11 / module / alternatives Manages alternative programs for common commands Authors: David Wittman (@DavidWittman), Gabe Mulley (@mulby)community.general.alternatives (1.3.11) — module
Install with ansible-galaxy collection install community.general:==1.3.11
collections: - name: community.general version: 1.3.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 community.general.alternatives: name: java path: /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java
- name: Alternatives link created community.general.alternatives: name: hadoop-conf link: /etc/hadoop/conf path: /etc/hadoop/conf.ansible
- name: Make java 32 bit an alternative with low priority community.general.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