diff options
Diffstat (limited to 'ansible/roles/nexus')
-rw-r--r-- | ansible/roles/nexus/defaults/main.yml | 2 | ||||
-rw-r--r-- | ansible/roles/nexus/tasks/install.yml | 8 |
2 files changed, 6 insertions, 4 deletions
diff --git a/ansible/roles/nexus/defaults/main.yml b/ansible/roles/nexus/defaults/main.yml index 3776f44e..92089e9a 100644 --- a/ansible/roles/nexus/defaults/main.yml +++ b/ansible/roles/nexus/defaults/main.yml @@ -4,3 +4,5 @@ populate_nexus: false # By dafault no additional docker images pushed to nexus at runtime # but all images are pre-populated either at buildtime or at install time (populate_nexus). runtime_images: {} +# Default rule for tarball naming translation +nexus3_image_tar: "{{ nexus3_image | regex_replace('(\\/|\\:)', '_') }}.tar" diff --git a/ansible/roles/nexus/tasks/install.yml b/ansible/roles/nexus/tasks/install.yml index 99d73dce..f8de5e95 100644 --- a/ansible/roles/nexus/tasks/install.yml +++ b/ansible/roles/nexus/tasks/install.yml @@ -8,8 +8,8 @@ - name: Load nexus image docker_image: - name: sonatype/nexus3 - load_path: "{{ app_data_path }}/offline_data/docker_images_infra/sonatype_nexus3_latest.tar" + name: "{{ nexus3_image }}" + load_path: "{{ infra_images_path }}/{{ nexus3_image_tar }}" state: present timeout: 120 @@ -18,10 +18,10 @@ name: nexus_network state: present -- name: Run nexus container +- name: Start nexus server container docker_container: name: nexus - image: sonatype/nexus3 + image: "{{ nexus3_image }}" networks: - name: nexus_network volumes: |