gantsign.intellij_jdks
Ansible Role: IntelliJ JDKs
This role sets up Java Development Kits (JDKs) for the IntelliJ IDEA Integrated Development Environment (IDE) here.
Requirements
Ansible version 2.9 or higher
A Linux distribution:
Debian Family:
- Ubuntu:
- Bionic (18.04)
- Focal (20.04)
- Ubuntu:
RedHat Family:
- Rocky Linux:
- Version 8
- Rocky Linux:
Note: Other versions might work but are not tested.
Role Variables
These variables can change how this role works (default values are shown below):
# Directory for user-specific IntelliJ IDEA configurations (relative to home)
# Note: The `ansible_local.intellij.general.user_config_dir` fact comes from the gantsign.intellij role
intellij_jdks_intellij_user_config_dir: '{{ ansible_local.intellij.general.user_config_dir }}'
This role needs to be set up for each user. Users are configured like this:
users:
- username: # Your Unix user name
intellij_jdks:
- name: # The JDK name to use
home: # The path to the JDK installation directory
# The name of the JDK to use as default for new projects.
# Required if you specify `intellij_jdks`.
# Must match one of the `intellij_jdks` names.
intellij_jdks_default:
Example Playbook
- hosts: servers
roles:
- role: gantsign.intellij_jdks
users:
- username: vagrant
intellij_jdks:
- name: '1.8'
home: '/usr/lib/jvm/java-8-openjdk-amd64'
- name: '1.7'
home: '/usr/lib/jvm/java-7-openjdk-amd64'
- name: '1.6'
home: '/usr/lib/jvm/java-6-openjdk-amd64'
intellij_jdks_default: '1.8'
Related Roles
You may find these roles useful:
- gantsign.intellij for installing and configuring the IntelliJ IDEA IDE.
- gantsign.intellij-plugins for conditionally installing IntelliJ IDEA IDE plugins.
More Roles From GantSign
Explore more roles by GantSign on Ansible Galaxy.
Development & Testing
This project uses Molecule to help with development and testing. The role is unit tested with Testinfra and pytest.
To develop or test, you need:
Installing these can be complicated, so this project includes the Molecule Wrapper. It is a script that installs Molecule and its dependencies (except Linux) and runs Molecule with your commands.
To test this role using Molecule Wrapper, run this command from the project root:
./moleculew test
Note: Some dependencies might require sudo
permission to install.
License
MIT License
Author Information
John Freeman
GantSign Ltd.
Company No. 06109112 (registered in England)
Role for configuring JDKs in the IntelliJ IDEA IDE.
ansible-galaxy install gantsign.intellij_jdks