blob: c91590865748b271e01cbeb1484e21ab44505382 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
---
- name: Change ownership of nexus_data
file:
path: "{{ app_data_path }}/nexus_data"
owner: 200
group: 200
recurse: true
- name: Load nexus image
docker_image:
name: "{{ nexus3_image }}"
load_path: "{{ infra_images_path }}/{{ nexus3_image_tar }}"
source: load
state: present
timeout: 120
- name: Create nexus network
docker_network:
name: nexus_network
state: present
- name: Start nexus server container
docker_container:
name: nexus
image: "{{ nexus3_image }}"
networks:
- name: nexus_network
network_mode: default
published_ports: "{{ nexus3_published_ports }}"
volumes:
- "{{ app_data_path }}/nexus_data:/nexus-data:rw"
state: started
restart_policy: unless-stopped
container_default_behavior: compatibility
- name: Wait for nexus to come up
uri:
url: "{{ nexus_url }}/service/metrics/healthcheck"
user: admin
password: admin123
force_basic_auth: true
method: GET
retries: "{{ nexus_come_up_wait_retries }}"
delay: 10
register: nexus_wait
until: not nexus_wait.failed
|