Skip to content

Commit

Permalink
Determine minor version of Nexus and set API URL
Browse files Browse the repository at this point in the history
  • Loading branch information
petrenkoas83 committed Aug 15, 2019
1 parent 57a0715 commit 581e9f3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
1 change: 1 addition & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ nexus_docker_proxy_port: 9081
nexus_docker_group_port: 9082
nexus_default_context_path: '/'
nexus_api_url: 'service/siesta/rest/v1/script/'
nexus_new_api_url: 'service/rest/v1/script/'

nexus_admin_password: 'changeme' # Note : admin password change subsequent to first-time install is *not implemented* yet
nexus_anonymous_access: false
Expand Down
12 changes: 9 additions & 3 deletions tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
---
- name: Setup api url and http method
- name: Determine minor version of Nexus
set_fact:
nexus_api_url: 'service/rest/v1/script/'
when: (nexus_version | match('3.17.0-01')) or (nexus_version | match('3.18.1-01'))
minor_nexus_version: "{{ nexus_version | regex_search(regexp,'\\1') }}"
vars:
regexp: '3\.(\d+)\..*'

- name: Set API URL
set_fact:
nexus_api_url: "{{ nexus_new_api_url }}"
when: minor_nexus_version >= 8

- include: nexus_purge.yml
when: ((purge is defined) and (purge | bool))
Expand Down

0 comments on commit 581e9f3

Please sign in to comment.