ayltai.adoptopenjdk

AdoptOpenJDK Role for Ansible

GitHub workflow status Ansible quality score Ansible role Maintenance Release License

This is a guide to install and set up AdoptOpenJDK on RHEL/CentOS and Debian-based systems using Ansible.

Buy me a coffee

Quick Start

Installation

To install the role, run:

ansible-galaxy install ayltai.adoptopenjdk

Usage

You can use the role in your playbook like this:

---
- hosts: all
  roles:
    - ayltai.adoptopenjdk
  vars:
    adoptopenjdk_package: adoptopenjdk-11-openj9

Variables

Name Default Description
adoptopenjdk_package adoptopenjdk-11-openj9 The name of the AdoptOpenJDK package to install.

Development

This project uses Docker to create a consistent development environment.

Install Docker

Download and install Docker from this link.

Build Docker Image

To build the Docker image, run:

docker build --tag adoptopenjdk:latest .

Run Docker Container

To run the Docker container, use:

docker run \
--privileged \
-v $(pwd):/ansible-adoptopenjdk \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /sys/fs/cgroup:/sys/fs/cgroup:ro \
-it --rm \
adoptopenjdk:latest

You will have a shell in a system with all necessary tools installed.

Install Dependencies

Inside the Docker container, run:

pip3 install -r requirements.txt

Unit Testing

To run the unit tests, execute:

molecule test

License

This project is licensed under the MIT License.

References

Informazioni sul progetto

Install and configure AdoptOpenJDK on RHEL/CentOS-based and Ubuntu systems

Installa
ansible-galaxy install ayltai.adoptopenjdk
Licenza
mit
Download
609
Proprietario
Principal Software Architect