Need help for install java

25 views
Skip to first unread message

rajeeb...@scienaptic.com

unread,
Jul 21, 2020, 4:04:50 PM7/21/20
to Ansible Project
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

Dick Visser

unread,
Jul 21, 2020, 4:25:33 PM7/21/20
to ansible...@googlegroups.com
Best to get started first:
https://docs.ansible.com/ansible/latest/user_guide/intro_getting_started.html
Then try this for your first playbook:
https://docs.ansible.com/ansible/latest/modules/apt_module.html
> --
> You received this message because you are subscribed to the Google Groups "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/6c4450ad-a133-43ff-80e9-2c7af4b43b3cn%40googlegroups.com.



--
Dick Visser
Trust & Identity Service Operations Manager
GÉANT

Rajeeb sahoo

unread,
Jul 21, 2020, 4:41:48 PM7/21/20
to ansible...@googlegroups.com
- 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



--
Thanks & Regards,
Rajeeb Sahoo

Jean-Yves LENHOF

unread,
Jul 21, 2020, 7:10:04 PM7/21/20
to ansible...@googlegroups.com

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

Rajeeb sahoo

unread,
Jul 22, 2020, 9:39:25 AM7/22/20
to ansible...@googlegroups.com, jean...@lenhof.eu.org
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.


Reply all
Reply to author
Forward
0 new messages