Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/gantsign/ansible_role_sdkman

Ansible role for downloading and installing SDKMAN
https://github.com/gantsign/ansible_role_sdkman

ansible ansible-role java sdkman

Last synced: 12 days ago
JSON representation

Ansible role for downloading and installing SDKMAN

Awesome Lists containing this project

README

        

Ansible Role: SDKMAN
====================

[![Tests](https://github.com/gantsign/ansible_role_sdkman/workflows/Tests/badge.svg)](https://github.com/gantsign/ansible_role_sdkman/actions?query=workflow%3ATests)
[![Ansible Galaxy](https://img.shields.io/badge/ansible--galaxy-gantsign.sdkman-blue.svg)](https://galaxy.ansible.com/gantsign/sdkman)
[![License](https://img.shields.io/badge/license-Apache_2-blue.svg)](https://raw.githubusercontent.com/gantsign/ansible_role_sdkman/master/LICENSE)

Role to download and install [SDKMAN](https://sdkman.io/) the software
development kit manager.

Requirements
------------

* Ansible >= 2.9

* Linux Distribution

* Debian Family

* Debian

* Stretch (9)
* Buster (10)
* Bullseye (11)

* Ubuntu

* Bionic (18.04)
* Focal (20.04)

* RedHat Family

* Rocky Linux

* 8

* Fedora

* 35

* SUSE Family

* openSUSE

* 15.3

* Note: other versions are likely to work but have not been tested.

Role Variables
--------------

The following variables will change the behavior of this role:

```yaml
# SDKMAN version number
sdkman_version: '5.16.0'

# The SHA256 of the SDKMAN redistributable package
sdkman_redis_sha256sum: 'a97aab3446ef76da2ea573d8e40e2c3d286468df69a40c83a4954b92c5229aa9'

# SDKMAN native version number
sdkman_native_version: '0.0.15'

# The SHA256 of the SDKMAN native redistributable package
sdkman_native_redis_sha256sum: '824e0a16c537ed20aaa71afcf5af0cc3a812ecdc7d50847080e6c77552159448'

# Directory to store files downloaded for SDKMAN
sdkman_download_dir: "{{ x_ansible_download_dir | default(ansible_env.HOME + '/.ansible/tmp/downloads') }}"

# SDKMAN is installed per user so you must specify at least one user
sdkman_users: []
# e.g.
# sdkman_users:
# - example_username1
# - example_username2
```

Example Playbook
----------------

```yaml
- hosts: servers
roles:
- role: gantsign.sdkman
sdkman_users:
- example_username
```

More Roles From GantSign
------------------------

You can find more roles from GantSign on
[Ansible Galaxy](https://galaxy.ansible.com/gantsign).

Development & Testing
---------------------

This project uses [Molecule](http://molecule.readthedocs.io/) to aid in the
development and testing; the role is unit tested using
[Testinfra](http://testinfra.readthedocs.io/) and
[pytest](http://docs.pytest.org/).

To develop or test you'll need to have installed the following:

* Linux (e.g. [Ubuntu](http://www.ubuntu.com/))
* [Docker](https://www.docker.com/)
* [Python](https://www.python.org/) (including python-pip)
* [Ansible](https://www.ansible.com/)
* [Molecule](http://molecule.readthedocs.io/)

Because the above can be tricky to install, this project includes
[Molecule Wrapper](https://github.com/gantsign/molecule-wrapper). Molecule
Wrapper is a shell script that installs Molecule and it's dependencies (apart
from Linux) and then executes Molecule with the command you pass it.

To test this role using Molecule Wrapper run the following command from the
project root:

```bash
./moleculew test
```

Note: some of the dependencies need `sudo` permission to install.

License
-------

Apache 2

Author Information
------------------

John Freeman

GantSign Ltd.
Company No. 06109112 (registered in England)