Does Oracle have an API that shows the latest stable JDK version? There is an ansible role that installs jdk8, but is incompatible with jdk9. The role parses a couple of html pages and the commands are incompatible with java9. It was quite hard to make it work for jdk9, and now the PR is broken for jdk8.

https://github.com/ansiblebit/oracle-java/issues/63

In order to prevent that a lot of work has to be done over and over again, it would be great if there is an API that shows the latest jdk version. Then this version could be used in the ansible role and then this will be more stable.
http://api.releasesoftwaremoreoften.com/latestversion?name=oraclejdk8
http://api.releasesoftwaremoreoften.com/latestversion?name=oraclejdk9

Running:

curl -s http://releasesoftwaremoreoften.com/latestversion?name=oraclejdk9 | jq .latestVersion


returns:

9.0.4


and 

curl -s http://releasesoftwaremoreoften.com/latestversion?name=oraclejdk8 | jq .latestVersion


returns:

8u162