After executing the role on Ubuntu 16.04,
java -version
returns
openjdk version "1.8.0_91"
OpenJDK Runtime Environment (build 1.8.0_91-8u91-b14-3ubuntu1~16.04.1-b14)
OpenJDK 64-Bit Server VM (build 25.91-b14, mixed mode)
That is because /usr/lib/jvm/default links to the wrong version of java
~# ls -la /usr/lib/jvm/default-java
lrwxrwxrwx 1 root root 24 Feb 25 20:41 /usr/lib/jvm/default-java -> java-1.8.0-openjdk-amd64
As a workaround I have to remove the incorrect link and create the right one as shown at https://github.com/fdiotalevi/my-ansible-playbooks/blob/master/dev-machine/03-java-stuff.yml#L6
After executing the role on Ubuntu 16.04,
java -versionreturns
That is because /usr/lib/jvm/default links to the wrong version of java
As a workaround I have to remove the incorrect link and create the right one as shown at https://github.com/fdiotalevi/my-ansible-playbooks/blob/master/dev-machine/03-java-stuff.yml#L6