Skip to content

Commit

Permalink
Nexus Onboarding Wizard control (#220)
Browse files Browse the repository at this point in the history
Logic to control nexus onboarding wizard display for nexus >= 3.17.0.
Added the `nexus_onboarding_wizard` var to control whether the onboarding wizard
shows on first admin login (default false)
Fixes #192
  • Loading branch information
Michael Shen authored and zeitounator committed Nov 28, 2019
1 parent 757755a commit 4a3d04c
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ _(Created with [gh-md-toc](https://github.com/ekalinin/github-markdown-toc))_
* [Nexus instance directories](#nexus-instance-directories)
* [Nexus JVM Ram setting](#nexus-jvm-ram-setting)
* [Plugin installation](#plugin-installation)
* [Onboarding Wizard](#onboarding-wizard)
* [Admin password](#admin-password)
* [Default anonymous access](#default-anonymous-access)
* [Public hostname](#public-hostname)
Expand Down Expand Up @@ -59,7 +60,7 @@ _(Created with [gh-md-toc](https://github.com/ekalinin/github-markdown-toc))_
* [License](#license)
* [Author Information](#author-information)

<!-- Added by: olcla, at: Sat Nov 9 16:00:35 CET 2019 -->
<!-- Added by: olcla, at: Thu Nov 28 21:55:10 CET 2019 -->

<!--te-->

Expand Down Expand Up @@ -201,6 +202,12 @@ nexus_plugin_urls: []
```
Put list of urls pointing to plugins build for your Nexus version. Only *.kar bundles can be installed this way.

### Onboarding Wizard
```yaml
nexus_onboarding_wizard: false
```
Controls whether the nexus onboarding wizard runs when the admin user logs in for the first time

### Admin password
```yaml
nexus_admin_password: 'changeme'
Expand Down
1 change: 1 addition & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ nexus_timezone: 'UTC' # java timezone
nexus_tmp_dir: "{{ (ansible_os_family == 'RedHat') | ternary('/var/nexus-tmp', '/tmp/nexus') }}"
nexus_script_dir: '{{ nexus_installation_dir }}/nexus-{{ nexus_version }}/etc/scripts'
nexus_plugin_urls: []
nexus_onboarding_wizard: false

# These are the default values for JVM Ram
# don't touch those unless you have read
Expand Down
7 changes: 7 additions & 0 deletions tasks/nexus_install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,13 @@
line: "-XX:MaxDirectMemorySize={{ nexus_max_direct_memory }}"
notify: nexus-service-stop

- name: Stop the admin wizard from running
lineinfile:
path: "{{ nexus_default_settings_file }}"
line: "nexus.onboarding.enabled={{ nexus_onboarding_wizard }}"
create: true
when: nexus_version is version_compare('3.17.0', '>=')

- name: Create Nexus tmp/backup directory
file:
path: "{{ item }}"
Expand Down

0 comments on commit 4a3d04c

Please sign in to comment.