I would like to use a role found on ansible galaxy: robertdebock.java
I would like to use this role to install java with the version as parameter. I have tried this in my roles/java/tasks/main.yml file:
- name: Install Java
include_role:
name: robertdebock.java
vars:
java_version: 10
Unfortunately, only version 11 is installed, no matter what I provide as parameter for java_version
.
How is it possible to use an existing Galaxy role with my own parameters?
Yes, it's possible to use an existing Galaxy role with your own parameters.
But in your case, read the VALID-COMBINATIONS.md documentation.
You probably get the default version for your OS:
https://github.com/robertdebock/ansible-role-java/blob/master/vars/main.yml#L73