[JAVA] Install Oracle JDK 8 with Ansible

The other day (2017/05/22?) Oracle JDK8 download site has been changed so far for automation. I can no longer download by the method of.

↓ is also ** I don't know how long it will be valid **, but it is a version that will work after 5/22. (For Amazon Linux, CentOS)

- name: download JDK8
    url: http://download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.rpm
    dest: /tmp/jdk-8u131-linux-x64.rpm
    mode: 0644
    validate_certs: no
    headers: "Cookie: oraclelicense=accept-securebackup-cookie"
- name: be sure JDK8 is installed
    name: /tmp/jdk-8u131-linux-x64.rpm
    state: present

This is the shell.

wget --no-cookies \
     --no-check-certificate \
     --header "Cookie: oraclelicense=accept-securebackup-cookie" \

It seems that JDKs before jdk-8u131 cannot be downloaded by the above method.

Recommended Posts

Install Oracle JDK 8 with Ansible
Install Java and Tomcat with Ansible
How to download Oracle JDK 8 rpm with curl
How to Install Oracle JDK 1.8 in Ubuntu 18.04 LTS?
Install java with Homebrew
Install Ruby 3.0.0 with asdf
Install Gradle with ubuntu16.04
Download Java with Ansible
Install Composer with Docker
How to use Oracle JDK 9 EA with Travis CI
Install Oracle JDK 8 via PPA in AWS Ubuntu Server 16.04
Install Oracle JDK 7, 8, etc via Ubuntu installer, skipping interaction
How to get jdk etc from oracle with cli
Clogged with Express npm install
Network install CentOS 8 with Kickstart.
Install Java 7 with Homebrew (cask)
Connect to oracle with eclipse!
How to install JDK8-10 (Mac)
Install Ruby on MSYS2 with pacman
Install java with Ubuntu 16.04 based Docker
Install JDK and JRE on Ubuntu 16.10
Install Java with zip on Windows
I can't install lombok with Gradle.
Install Java Open JDK 8 on CentOS 7
mysql2 fails to install with bundle install
Install ruby on Ubuntu 20.04 with rbenv
With CodeDeploy, Install doesn't end endlessly
Switch with CentOS7 series + JDK-9.0.1 + JDK1.8.0 + alternatives