sfuhrm.adoptopenjdk_role

AdoptOpenJDK Ansible Role

This Ansible Role installs the AdoptOpenJDK Java VM on a Debian/Ubuntu or CentOS system.

Getting Started

Prerequisites

To use this role in your playbook, you need:

  • Ansible version 2.4 or higher.
  • A machine running Debian/Ubuntu or CentOS.

Configuring

The role has some default settings that can be changed. To customize them, set these variables in your Ansible files:

  • adoptopenjdk_package: adoptopenjdk-13-hotspot

    This is the name of the package you want to install. Check below for package names for Debian-based systems.

  • adoptopenjdk_state: present

    Set this to present to install Java or absent to uninstall it.

Possible package names for Debian-based systems include:

adoptopenjdk-11-hotspot
adoptopenjdk-11-hotspot-jre
adoptopenjdk-12-hotspot
adoptopenjdk-12-hotspot-jre
adoptopenjdk-13-hotspot
adoptopenjdk-13-hotspot-jre
adoptopenjdk-8-hotspot
adoptopenjdk-8-hotspot-jre

Installing

Add or create a roles dependency file (e.g., requirements.yml):

- src: http://github.com/sfuhrm/adoptjopendk_role.git
  scm: git
  version: master
  name: adoptopenjdk_role

Or if you prefer, use Ansible Galaxy as the source:

- src: sfuhrm.adoptopenjdk_role
  version: master
  name: adoptopenjdk_role

Install the role using the ansible-galaxy command:

$ ansible-galaxy install -p roles -r requirements.yml -f

To use it in a playbook:

---
- hosts: someserver
  roles:
    - adoptopenjdk_role

Usage

Ansible

You can find the default settings for the role in defaults/main.yml.

OpenJDK

You can choose a specific version of AdoptOpenJDK by changing the adoptopenjdk_package variable in your group_vars, host_vars, or playbook.yml.

License

Apache 2.0 License

This project is licensed under the Apache 2.0 license - see the LICENSE file for more information.

Informazioni sul progetto

AdoptOpenJDK Java role

Installa
ansible-galaxy install sfuhrm.adoptopenjdk_role
Licenza
apache-2.0
Download
6.8k
Proprietario
Passionate about networking automation, CI/CD advocate, developer and code evangelist.