Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/racke/ansible-role-java
https://github.com/racke/ansible-role-java
Last synced: 5 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/racke/ansible-role-java
- Owner: racke
- License: mit
- Created: 2021-12-13T09:46:36.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2024-08-08T14:27:14.000Z (6 months ago)
- Last Synced: 2024-11-18T18:43:26.934Z (2 months ago)
- Language: Jinja
- Size: 121 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Ansible Role: Java
[![CI](https://github.com/geerlingguy/ansible-role-java/workflows/CI/badge.svg?event=push)](https://github.com/geerlingguy/ansible-role-java/actions?query=workflow%3ACI)
Installs Java for RedHat/CentOS, Amazon, and Debian/Ubuntu linux servers.
## Requirements
None.
## Role Variables
Available variables are listed below, along with default values:
# The defaults provided by this role are specific to each distribution.
java_packages:
- java-1.8.0-openjdkSet the version/development kit of Java to install, along with any other necessary Java packages. Some other options include are included in the distribution-specific files in this role's 'defaults' folder.
java_home: ""
If set, the role will set the global environment variable `JAVA_HOME` to this value.
## Dependencies
None.
## Example Playbook (using default package)
- hosts: servers
roles:
- role: geerlingguy.java
become: yes## Example Playbook (install OpenJDK 8)
For RHEL / CentOS:
- hosts: server
roles:
- role: geerlingguy.java
when: "ansible_os_family == 'RedHat'"
java_packages:
- java-1.8.0-openjdkFor Ubuntu < 16.04:
- hosts: server
tasks:
- name: installing repo for Java 8 in Ubuntu
apt_repository: repo='ppa:openjdk-r/ppa'
- hosts: server
roles:
- role: geerlingguy.java
when: "ansible_os_family == 'Debian'"
java_packages:
- openjdk-8-jdk## License
MIT / BSD
## Author Information
This role was created in 2014 by [Jeff Geerling](https://www.jeffgeerling.com/), author of [Ansible for DevOps](https://www.ansiblefordevops.com/).