Skip to content

Latest commit

History

85 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Ansible Role: skydevops-java

LicenseBuild Status

Description

This role will install and configure Oracle Java 1.8.0_171/172 on RedHat/CentOS and Debian/Ubuntu systems.

Requirements

  • Ansible >=2.4
  • EPEL Repo for RedHat/Centos, which can be installed automatically using the common ansible role.

Role Variables

All the variable that can be overridden are stored in vars/main.yml or defaults/main.yml file as shown in the table below:

NameDefault ValueDescription
java_main_rel: 8Major Release of Java
java_min_rel: 171Minor Release of Java, select 172 or 171
java_data_dir: /dataThe directory where the application data is stored
Automatically created by common Role
java_install_dir: /appsThe directory where the application is installed
Automatically created by common Role
java_version: "1.{{java_main_rel}}.0_{{java_min_rel}}"Describes the version of Java that will be installed
java_src_tar: "jdk-{{java_main_rel}}u{{java_min_rel}}-linux-x64.tar.gz"The Oracle Java Archive
java_home: "{{java_install_dir}}/jdk{{java_version}}"JAVA_HOME ENV variable
java_shared_home: /usr/shared/javaSymlink to the installed JAVA
java_profile_sh: /etc/profile.d/jdk.shJinja2 Template, which contains the info to source the ENV variables

Dependencies

Example

Playbook Default file locations based on playbook execution

{# The defaults PATHS where Ansible looks for the files #}When executing the playbook from the following path:
$ cd {{ path_on_server }}/$ ansible-playbook {{playbook_dir}}/playbook.yml{{ path_on_server }}/roles/{{ ansible_role }}/files/jdk-8u171-linux-x64.zip {{ path_on_server }}/roles/{{ ansible_role }}/jdk-8u171-linux-x64.zip {{ path_on_server }}/roles/{{ ansible_role }}/tasks/files/jdk-8u171-linux-x64.zip {{ path_on_server }}/roles/{{ ansible_role }}/tasks/jdk-8u171-linux-x64.zip {{ path_on_server }}/{{ playbook_dir }}/files/jdk-8u171-linux-x64.zip {{ path_on_server }}/{{ playbook_dir }}/jdk-8u171-linux-x64.zip

Playbook

- hosts: allbecome: yesgather_facts: yesroles:
- role: common
- hosts: serversbecome: yesgather_facts: yesroles:
- role: skydevops-java

License

Licensed under the Apache License V2.0. See the LICENSE file for details.

Author Information

You can find me on Twitter: @skydevops

Contributors

About

Installs and configures Oracle Java on redHat/CentOS and Debian/Ubuntu

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages