Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow installation of java11 version of nexus #424

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,12 @@ Ansible variables, along with the default values (see `default/main.yml`) :
nexus_download_url: "http://download.sonatype.com/nexus/3"
# nexus_download_ssl_verify: <unset>
# nexus_version_running: <unset>
# nexus_suffix: <unset>
```

The role will install latest nexus available version by default. You may fix the version by setting
the `nexus_version` variable. See available versions at https://www.sonatype.com/download-oss-sonatype.
Starting with 3.67.0 you can set `nexus_suffix` to `java11` to install that version (instead of the default java8).
When having a slow pull through proxy, a retry can be useful to prevent timeouts. You can add retries to the download by setting these variables:
```yaml
nexus_download_retries: 3 # 0 by default
Expand Down
8 changes: 8 additions & 0 deletions tasks/nexus_install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,14 @@
ansible.builtin.set_fact:
nexus_package: nexus-{{ nexus_version }}-unix.tar.gz

- name: Register nexus package name
ansible.builtin.set_fact:
nexus_package: nexus-{{ nexus_version }}-{{ nexus_suffix }}-unix.tar.gz
when:
- nexus_suffix is defined
- nexus_suffix is not none
- nexus_suffix | length

- name: Download nexus_package
ansible.builtin.get_url:
url: "{{ nexus_download_url }}/{{ nexus_package }}"
Expand Down