OpenJDK Install - Specific version

Is there a way to install a specic version of JDK8 on CentOS using ansible? we are looking to pin versions of JDK to

java-1.8.0-openjdk-devel.x86_64 1:1.8.0.282.b08-1.el7_9

Thank you.

https://docs.ansible.com/ansible/latest/collections/ansible/builtin/dnf_module.html#parameter-name

we are using yum module to install it. How do we pass version information for JDK8?
java-1.8.0-openjdk-1.8.0.282.b08-4.fc34.x86_64.rpm ( this is the specific package we are trying to install)

Can you selected a version of that particular package?

I worked with Azul JDK (free on Azure) and to achieve version lock I
used yum versionlock:
https://www.man7.org/linux/man-pages/man1/yum-versionlock.1.html

Thanks to versionlock you can still run "yum update".

Wawrzek

PS. I'll try to find an example of passing version to the yum module,
but it should be in docs.