{"id":15069513,"url":"https://github.com/idealista/java_role","last_synced_at":"2025-04-10T16:52:40.310Z","repository":{"id":43482958,"uuid":"76857031","full_name":"idealista/java_role","owner":"idealista","description":"Ansible role to install Java (OpenJDK, AdoptOpenJDK and Corretto)","archived":false,"fork":false,"pushed_at":"2024-05-30T07:30:37.000Z","size":494,"stargazers_count":14,"open_issues_count":8,"forks_count":18,"subscribers_count":26,"default_branch":"master","last_synced_at":"2025-03-24T14:44:37.583Z","etag":null,"topics":["adoptopenjdk","ansible","ansible-role","corretto","debian","docker-java","java","java-ansible-role","java-virtual-machine","jvm","openjdk","ubuntu"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/idealista/jdk","language":"YAML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/idealista.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-12-19T11:38:17.000Z","updated_at":"2024-07-04T08:51:35.000Z","dependencies_parsed_at":"2024-09-25T01:43:11.361Z","dependency_job_id":"94f63b4a-6520-4316-b1a3-dc52f313eb2e","html_url":"https://github.com/idealista/java_role","commit_stats":null,"previous_names":[],"tags_count":35,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idealista%2Fjava_role","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idealista%2Fjava_role/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idealista%2Fjava_role/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idealista%2Fjava_role/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/idealista","download_url":"https://codeload.github.com/idealista/java_role/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248256380,"owners_count":21073517,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["adoptopenjdk","ansible","ansible-role","corretto","debian","docker-java","java","java-ansible-role","java-virtual-machine","jvm","openjdk","ubuntu"],"created_at":"2024-09-25T01:42:56.140Z","updated_at":"2025-04-10T16:52:40.285Z","avatar_url":"https://github.com/idealista.png","language":"YAML","readme":"![Logo](https://raw.githubusercontent.com/idealista/java_role/master/logo.gif)\n\n[![Build Status](https://app.travis-ci.com/idealista/java_role.png)](https://app.travis-ci.com/idealista/java_role)\n[![Docker Hub pulls](https://img.shields.io/docker/pulls/idealista/jdk.svg)](https://hub.docker.com/r/idealista/jdk/)\n\n# Java Ansible role\n\nThis Ansible Role installs JDKs from different vendors (OpenJDK, AdoptOpenJDK and Corretto) in a [Debian/Ubuntu or CentOS environment](https://github.com/idealista/java_role/blob/master/meta/main.yml#L7).\n\n- [Getting Started](#getting-started)\n\t- [Prerequisities](#prerequisities)\n\t- [Installing](#installing)\n- [Usage](#usage)\n- [Testing](#testing)\n- [Built With](#built-with)\n- [Versioning](#versioning)\n- [Authors](#authors)\n- [License](#license)\n- [Contributing](#contributing)\n\n## Getting Started\n\nThese instructions will get you a copy of the role for your Ansible playbook.\n\nOnce launched, it will install Java using Debian or RHEL packages.\n\n### Prerequisities\n\nTo use this role as dependency in your playbook, prerequisites below:\n\nAnsible \u003e=2.9.0 version installed.\nInventory destination should be a Debian/Ubuntu or CentOS environment.\n\nFor testing purposes you will need [Python 3.7+](https://www.python.org/downloads/release/python-377/), [Pipenv](https://github.com/pypa/pipenv).\n\n### Installing\n\nCreate or add to your roles dependency file (e.g requirements.yml):\n\n```yml\n- src: http://github.com/idealista/java_role.git\n  scm: git\n  version: 7.0.0\n  name: java\n```\n\nor using [Ansible Galaxy](https://galaxy.ansible.com/idealista/java_role/) as origin if you prefer:\n\n```yml\n- src: idealista.java_role\n  version: 7.0.0\n  name: java\n```\n\nAlternatively you could find tagged Docker images for Debian Stretch and Buster, Ubuntu Xenial, Bionic and Focal, and CentOS 7 and 8 in [Docker Hub](https://hub.docker.com/r/idealista/jdk/).\n\nInstall the role with ansible-galaxy command:\n\n```sh\n$ ansible-galaxy install -p roles -r requirements.yml -f\n```\n\nUse in a playbook:\n\n```yml\n---\n- hosts: someserver\n  roles:\n    - java\n```\n\n## Usage\n\n### Docker Hub\n\nWe publish every role version as a Docker image in Docker Hub: https://hub.docker.com/r/idealista/jdk.\n\nYou can pull our images by executing:\n\n```bash\ndocker pull idealista/jdk:${JDK_VERSION}-${DOCKER_IMAGE_BASE}-${JDK_VENDOR}headless)\n```\n\n`JDK_VERSION:` Preferred JDK version.\n`DOCKER_IMAGE`: Currently supporting: `stretch`/`buster/bullseye` to select between Debian versions, `xenial`/`bionic`/`focal` to select between Ubuntu versions, and `7`/`8` to select a CentOS version.\n`JDK_VENDOR`: Currently supporting `openjdk`/ `adoptopenjdk`/`corretto`\n\nFor instance:\n\n```bash\ndocker pull idealista/jdk:8u191-xenial-openjdk-headless\n```\n\nList of versions (tags) can be checked on [Docker Hub](https://cloud.docker.com/repository/docker/idealista/jdk/tags)\n\n### Ansible\n\n[defaults/main.yml](https://github.com/idealista/java_role/blob/master/defaults/main.yml)\n\n#### OpenJDK\n\nA specific OpenJDK version should be selected overriding `java_open_jdk_version_major` variable using group vars/host vars:\n\nOperative System | OpenJDK major release\n--- | ---\nDebian Stretch | `8` (default)\nDebian Stretch | `11`\nDebian Buster | `11` (default)\nDebian Bullseye | `17`\nDebian Bullseye | `11` (default)\nDebian Bookworm | `17`\nDebian Bookworm | `17` (default)\nUbuntu Xenial | `8`\nUbuntu Xenial | `9` (default)\nUbuntu Bionic | `8`\nUbuntu Bionic | `11` (default)\nUbuntu Focal | `8`\nUbuntu Focal | `11`\nUbuntu Focal | `17` (default)\nUbuntu Jammy | `11`\nUbuntu Jammy | `17` (default)\nCentOS 7 | `1.6.0`\nCentOS 7 | `1.7.0`\nCentOS 7 | `1.8.0`\nCentOS 7 | `11` (default)\nCentOS 8 | `1.8.0`\nCentOS 8 | `11` (default)\n\nOther OpenJDK implementations out of GNU/Linux distributions streams are not officially supported, but it's easy use this role too adding extra repositories (see vars/ in AdoptOpenJDK/Temurin and Corretto directories).\n\n### Adding certificates into Java's truststore\n\nThis role supports adding certificates into Java's truststore. Truststore location may change depending on Java version:\n\n- Truststore location for Java 9 onwards: $JAVA_HOME/lib/security/cacerts\n- Truststore location for Java prior to 9: $JAVA_HOME/jre/lib/security/cacerts\n\nA specific truststore location should be selected overriding `java_keystore_dir` variable using group vars/host vars. In addition, you must to set which certificates you want to add setting `java_certs` variable and the truststore password setting `java_cert_keystore_pass`\n\n## Testing\n\n```sh\n$ pipenv sync\n$ DOCKER_IMAGE_BASE=(debian:stretch-slim|debian:buster-slim|debian_bullseye-slim|amd64/ubuntu:xenial|amd64/ubuntu:bionic|amd64/ubuntu:focal|centos:7|centos:8) JDK_VENDOR=(`java_jdk_version` openjdk|adoptopenjdk|corretto) JDK_MAJOR=(`java_open_jdk_version_major` see [.travis.yml](.travis.yml) file to check supported versions) JDK_VERSION=(`java_open_jdk_version` see [.travis.yml](.travis.yml) file to check supported versions) pipenv run molecule test\n```\n**Note:** JDK_VENDOR is an optional parameter, if not defined this role will use openjdk.\n**Note:** JDK_VERSION is an optional parameter, if not defined this role will install the latest available package for the selected Java major release.\n**Note:** debian9 (Debian Stretch) will be used as default linux distro if none is provided.\n\nSee [molecule directory](https://github.com/idealista/java_role/tree/master/molecule) to check possible testing platforms.\n\n## Built With\n\n![Ansible](https://img.shields.io/badge/ansible-4.4.0-green.svg)\n![Molecule](https://img.shields.io/badge/molecule-3.4.0-green.svg)\n![Packer](https://img.shields.io/badge/packer-1.3.4.0-green.svg)\n\n## Versioning\n\nFor the versions available, see the [tags on this repository](https://github.com/idealista/java_role/tags).\n\nAdditionaly you can see what change in each version in the [CHANGELOG.md](CHANGELOG.md) file.\n\n## Authors\n\n* **Idealista** - *Work with* - [idealista](https://github.com/idealista)\n\nSee also the list of [contributors](https://github.com/idealista/java_role/contributors) who participated in this project.\n\n## License\n\n![Apache 2.0 License](https://img.shields.io/hexpm/l/plug.svg)\n\nThis project is licensed under the [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0) license - see the [LICENSE](LICENSE) file for details.\n\n## Contributing\n\nPlease read [CONTRIBUTING.md](.github/CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fidealista%2Fjava_role","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fidealista%2Fjava_role","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fidealista%2Fjava_role/lists"}