Alternatives are a decent way in linux to set different path executables for a certain program. I'd guess that the most commonly used alternatives on modern systems are java and python. For this example, I'll use three different versions of java installed on a el8 system and use the 'community.general.alternatives' module to select the executable behind '/usr/bin/java'. First, we need to define some variables and ensure java is installed: - name: deploy java hosts: test user: root become: false gather_facts: true collections: - community.general vars: java_selected_version: "{{ java_future_version }}" java_legacy_version: '1.8.0' java_current_version: '11' java_future_version: '17' tasks: - name: install java packages ansible.builtin.package: name: - "java-{{ java_legacy_version }}-openjdk" - "java-{{ java_legacy_version }}-o...