blob: c88e5855abf6eb8974e22913a9733a54217a9129 [file] [log] [blame]
Michal Zegan3a7e0732018-12-19 11:51:26 +01001---
2- name: Change ownership of nexus_data
3 file:
4 path: "{{ app_data_path }}/nexus_data"
5 owner: 200
6 group: 200
Samuli Silviusf6f5fc42019-02-13 11:00:39 +02007 recurse: true
Michal Zegan3a7e0732018-12-19 11:51:26 +01008
9- name: Load nexus image
10 docker_image:
Tomáš Levoraa0ad5c12019-03-28 17:45:55 +010011 name: "{{ nexus3_image }}"
12 load_path: "{{ infra_images_path }}/{{ nexus3_image_tar }}"
Michal Zegan3a7e0732018-12-19 11:51:26 +010013 state: present
Michal Zegan8e5a7da2018-12-20 12:16:56 +010014 timeout: 120
Michal Zegan3a7e0732018-12-19 11:51:26 +010015
16- name: Create nexus network
17 docker_network:
18 name: nexus_network
19 state: present
20
Tomáš Levoraa0ad5c12019-03-28 17:45:55 +010021- name: Start nexus server container
Michal Zegan3a7e0732018-12-19 11:51:26 +010022 docker_container:
23 name: nexus
Tomáš Levoraa0ad5c12019-03-28 17:45:55 +010024 image: "{{ nexus3_image }}"
Michal Zegan3a7e0732018-12-19 11:51:26 +010025 networks:
26 - name: nexus_network
27 volumes:
28 - "{{ app_data_path }}/nexus_data:/nexus-data:rw"
29 state: started
30 restart_policy: unless-stopped
Samuli Silviusf6f5fc42019-02-13 11:00:39 +020031
32- name: Wait for nexus to come up
33 uri:
34 url: "{{ nexus_url }}/service/metrics/healthcheck"
35 user: admin
36 password: admin123
37 force_basic_auth: true
38 method: GET
Michal Zegan50651c12019-05-27 13:51:41 +020039 retries: "{{ nexus_come_up_wait_retries }}"
Samuli Silviusf6f5fc42019-02-13 11:00:39 +020040 delay: 10
41 register: nexus_wait
42 until: not nexus_wait.failed