Skip to content

JDKs and/or JCE(Unlimited Strength) from Oracle website to machines defined in the host-inventory file using Ansible.

Notifications You must be signed in to change notification settings

nidhiu/javaProvisioning

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

javaProvisioning

JDKs and/or JCE(Unlimited Strength) from Oracle website to machines defined in the host-inventory file using Ansible.


Oracle doesn't allow APIs to download JDKs, so we have to create an account and then manually download JDKs by accepting the license to the local drive at control host(where ansible is installed).

Oracle is notorious with changing urls so please forgive me if these urls are pointing to 404

  • Source(control machine) and Destination location(controlled machines) of JDKs should be defined in variables file at /group_vars/all.yaml
  • Ansible module copies the jdk's tarball from control to controlled machine, make a sha256 for tarball in file named as checksumDB at /JDK_Destination/checksumDB
  • Unzip the jce and give the location of it in variables file, rename the unzip jce 5's folder to jce5 because jdk 5 and 6 unzip with same folder name, playbooks are designed to read the name of jce 5's as jce5.
  • If jce variable is defined in playbook then ansible will provide unlimited strength binaries to that jdk otherwise not.
  • We are not deleting the tarball to make ansible not copy the same jdk tarball again.

  • hosts: all = host name for deploying JDK's to IPs given in hosts inventory file. Note: We are executing this playbook on [all] and not [java]
  • java = role name for playing included java playbook /roles/java/tasks/main.yml
  • tarURL = name of the tarball downloaded from the web.
  • jce = name of the extracted jce unzip file from the web.

  • hosts: [java] = hosts name where tasks needs to be performed via playbook /etc/ansible/hosts.

    hosts: [all] = We are executing this playbook on [all] vms listed at /etc/ansible/hosts

The overall structure looks like

and

file: playbook.yaml
Directories:
  * roles
  * group_vars

How to run playbook

ansible-playbook playbook.yaml -K

Where -k = ask for privilege escalation password.

This is what resulted at Controlled machine(destination machine, where provisioning is done).

checksumDB file at Controlled machine(destination machine, where provisioning is done).

About

JDKs and/or JCE(Unlimited Strength) from Oracle website to machines defined in the host-inventory file using Ansible.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published