Skip to content

Commit

Permalink
nexus: add nexus_force_init parameter (#1657)
Browse files Browse the repository at this point in the history
With the nexus_force_init parameter it is possible to force the
initialisation of the service.

Signed-off-by: Christian Berendt <[email protected]>
  • Loading branch information
berendt authored Oct 4, 2024
1 parent 0d4dd02 commit 09ab46f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 4 additions & 2 deletions roles/nexus/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,14 @@ nexus_container_name: nexus
nexus_old_service_name: "docker-compose@nexus"
nexus_service_name: "nexus"

# NOTE: provision scripts that are included in the Nexus container image
nexus_force_init: false

# provision scripts that are included in the Nexus container image
nexus_provision_scripts:
- anonymous.json
- cleanup.json

# NOTE: provision scripts that are included in this role
# provision scripts that are included in this role
nexus_provision_groovy_scripts:
- create_repos_from_list
- setup_http_proxy
Expand Down
4 changes: 3 additions & 1 deletion roles/nexus/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,6 @@
- name: Include initialize tasks
ansible.builtin.include_tasks: initialize.yml
tags: initialize
when: not ansible_local.osism.nexus.status | default("False") | bool
when:
- (not ansible_local.osism.nexus.status | default("False") | bool or
nexus_force_init | bool)

0 comments on commit 09ab46f

Please sign in to comment.