Hello,
I am new in Ansible.
I need to install ORACLE JAVA 8 and that package is in .deb. (jdk1.8_1.8.0231-1_amd64.deb, jre1.8_1.8.0211-1_amd64.deb)
can anyone help me out to write ansible code for install java with the above condition?
Thanks
Rajeeb
-
name: Install java DEB package
hosts: ubuntu_test
become: yes
tasks:
-
name: Copy jdk.deb file
copy:
src: /home/centos/jdk1.8_1.8.0231-1_amd64.deb
dest: /tmp
-
name: Installing jdk.deb package
apt:
deb: /tmp/jdk1.8_1.8.0231-1_amd64.deb
state: present
-
name: Copy jre.deb file
copy:
src: /home/centos/jre1.8_1.8.0211-1_amd64.deb
dest: /tmp
-
name: Installing jre.deb package
apt:
deb: /tmp/jre1.8_1.8.0211-1_amd64.deb
state: present
Ran this. but it’s not installing in remote rserver
Hi,
Where did the package come from ? (sound like alien package of an rpm ?)
Some ideas :
-
If the package came from Oracle, very often, an interaction is needed to accept EULA… (I had that kind of problem on CentOS a while ago)
-
Have you tried a manual install ?
-
Also I saw that xz-utils is needed on remote server (look at documentation on apt). Perhaps your playbook should ensure it is installed before...
- If you want a specific jdk version not packaged for debian, use ``**make**-jpkg to create a good package that can be installed without prompting user.
Regards,
JYL
Hi
I have a licensed version of rpm. I had converted .rpm to .deb through alien
I tried with manually but it’s not happing.
are you telling me that I should install xz-utils?
I want a specific version like java 8 .deb package.