blob: f8de5e9507f91e23a260db83cda8c61d44eeee2d [file] [log] [blame]
---
- 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 }}"
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
volumes:
- "{{ app_data_path }}/nexus_data:/nexus-data:rw"
state: started
restart_policy: unless-stopped
- 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: 30
delay: 10
register: nexus_wait
until: not nexus_wait.failed