diff --git a/README.md b/README.md index d9c44bd9..2e3d706c 100644 --- a/README.md +++ b/README.md @@ -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: # nexus_version_running: + # nexus_suffix: ``` 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 diff --git a/tasks/nexus_install.yml b/tasks/nexus_install.yml index fd4f9404..4e7a8896 100644 --- a/tasks/nexus_install.yml +++ b/tasks/nexus_install.yml @@ -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 }}"