Sign inSign up

idealista/java-debian-ansible

By idealista

•Updated almost 8 years ago

Debian 8/9 image ready with Ansible and OpenJDK installed and compatible with systemd

Image
0

10K+

idealista/java-debian-ansible repository overview

Logo

Build Status Docker Hub pulls

⁠Java Ansible role

This Ansible Role installs java (OpenJDK⁠ or Oracle JDK⁠) in a Debian/Ubuntu environment⁠.

⁠Getting Started

These instructions will get you a copy of the role for your Ansible playbook.

Once launched, it will install Java using APT Packages (default) or downloading fresh version of Oracle Technology Network.

DISCLAIMER: Usage of any version of Oracle JDK in this role implies you have accepted the Oracle Binary Code License Agreement for Java SE⁠.

⁠Prerequisities

Ansible 2.4.5.0 version installed. Inventory destination should be a Debian environment.

For testing purposes, Molecule⁠ with Docker⁠ as driver.

⁠Installing

Create or add to your roles dependency file (e.g requirements.yml):

- src: http://github.com/idealista/java-role.git
  scm: git
  version: 3.2.0
  name: java

or using Ansible Galaxy⁠ as origin if you prefer:

- src: idealista.java-role
  version: 3.2.0
  name: java

Alternatively you could find tagged Docker images for Debian Jessie, Wheezy and Ubuntu Xenial in Docker Hub⁠.

Install the role with ansible-galaxy command:

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

Use in a playbook:

---
- hosts: someserver
  roles:
    - {
        role: java,
        java_open_jdk_set_version: '8'
      }

⁠Usage

⁠OpenJDK

To set multiple versions

java_open_jdk_version: ['6', '7', '8']

To set system defaults

java_open_jdk_set_version: '8'

⁠Testing

$ pipenv install -r test-requirements.txt --python 2.7
$ MOLECULE_DISTRO=(debian8|debian9|ubuntu1604) pipenv run molecule test -s (openjdk|oraclejdk)

Note: debian9 (Debian Stretch) will be used as default linux distro if none is provided. It's mandatory to define a scenario (openjdk or oraclejdk must be selected).

See molecule directory⁠ to check possible testing platforms.

⁠Built With

Ansible

⁠Versioning

For the versions available, see the tags on this repository⁠.

Additionaly you can see what change in each version in the CHANGELOG.md⁠ file.

⁠Authors

See also the list of contributors⁠ who participated in this project.

⁠License

Apache 2.0 Licence

This project is licensed under the Apache 2.0⁠ license - see the LICENSE⁠ file for details.

⁠Contributing

Please read CONTRIBUTING.md⁠ for details on our code of conduct, and the process for submitting pull requests to us.

Tag summary

Content type

Image

Digest

Size

375.6 MB

Last updated

almost 8 years ago

docker pull idealista/java-debian-ansible