https://github.com/raffienficiaud/ansible-atlassian-bambooagent-oracle-java-role
Ansible roles for installing and configuring Oracle Java for Atlassian Bamboo build agents (OSX/Linux/Win)
https://github.com/raffienficiaud/ansible-atlassian-bambooagent-oracle-java-role
ansible ansible-role oracle-java
Last synced: 4 months ago
JSON representation
Ansible roles for installing and configuring Oracle Java for Atlassian Bamboo build agents (OSX/Linux/Win)
- Host: GitHub
- URL: https://github.com/raffienficiaud/ansible-atlassian-bambooagent-oracle-java-role
- Owner: raffienficiaud
- Created: 2017-09-25T07:27:34.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2020-02-05T18:53:14.000Z (over 5 years ago)
- Last Synced: 2025-01-13T02:41:43.226Z (6 months ago)
- Topics: ansible, ansible-role, oracle-java
- Homepage:
- Size: 15.6 KB
- Stars: 1
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Ansible Atlassian Bambooagent Oracle Java role
==============================================Installs an Oracle Java and certificates to its keystore on a remote machine and from a file installer.
This role can be used prior to deploying an agent running Atlassian Bamboo or any other Java service.
It is available on *Windows, OSX, Ubuntu*.On Linux, the
installed Java becomes the default Java and the Java *alternatives* are updated.Requirements
------------No system requirements.
Role Variables
--------------| variable | default | meaning |
|----------|---------|---------|
|`java_version_major`| `1`| Java major version (the `1` in `1.8.64`)|
|`java_version_minor`| **required**| Java major version (the `8` in `1.8.64`)|
|`java_version_update`|**required**| The update version (the `64` in `1.8.64`)|
|`java_keystore_location`|`jre/lib/security/cacerts` | Indicates the path of the Java keystore relative to the `JAVA_HOME`|
|`certificate_files`|**required**| Certificate of the server running Bamboo server|
|`java_installation_path`|`/usr/local/oracle`| Java installation folder |
|`java_installation`|**required**| the definition of the Java installation (see below)|**Note** on Linux the final `JAVA_HOME` is a folder inside `java_installation`.
### `java_installation` variable
The variable `java_installation` needs to be defined when running the role:
```
# Installs Java on the remotes, fixes the paths of the files on the fly
- role: atlassian-bambooagent-oracle-java-role
java_installation: "{{ local_java_installation }}"
certificate_files:
- alias: "my-cert1"
file: "ca-file.crt"
```The definition is as follows:
On OSX:
```
local_java_installation:
# the DMG containing the Java installer
file: jdk-{{java_version_minor}}u{{java_version_update}}-macosx-x64.dmg# the install command of the DMG role
install_cmd: 'installer -dumplog -pkg "${mount}/JDK {{ java_version_minor }} Update {{ java_version_update }}.pkg" -target /'remove_interactive: False
```On Windows:
```
local_java_installation:
# Java installer
file: "jdk-{{ java_version_minor }}u{{ java_version_update }}-windows-x64.exe"# Additional options (string) to pass to the installer
install_options: ""
```On Linux:
```
local_java_installation:
# Archive containing the Java installer
file: "jdk-{{ java_version_minor }}u{{ java_version_update }}-linux-x64.tar.gz"
```### HTTPS certificate
The role also requires the variable `certificate_files` defined eg like this:
```
- certificate_files:
- alias: "bamboo_server_certificate_alias"
file: "{{some_root_location}}/bamboo_server_certificate.crt"
```This installs a **list** of certificates into the remote Java. Each certificate is identified by its alias (as it appears
when certificates are listed from the keystore) and by their local file. This is intended to be used for installing the CA
from which the webserver in front of the Java service (eg. NGinx in front of Atlassian Bamboo) has a certificate.Dependencies
------------`atlassian-bambooagent-install-dmg`: for installing Java on OSX
License
-------BSD
Author Information
------------------Any comments on the Ansible, PR or bug reports are welcome from the corresponding Github project.