Need help related to jdk installation on linux

Can anyone help how to install java by using ansible on Linux without internet by using rpm or tar.gz file. Thanks In advance.