Michal Zegan | 3a7e073 | 2018-12-19 11:51:26 +0100 | [diff] [blame] | 1 | --- |
| 2 | - name: Change ownership of nexus_data |
| 3 | file: |
| 4 | path: "{{ app_data_path }}/nexus_data" |
| 5 | owner: 200 |
| 6 | group: 200 |
Samuli Silvius | f6f5fc4 | 2019-02-13 11:00:39 +0200 | [diff] [blame] | 7 | recurse: true |
Michal Zegan | 3a7e073 | 2018-12-19 11:51:26 +0100 | [diff] [blame] | 8 | |
| 9 | - name: Load nexus image |
| 10 | docker_image: |
Tomáš Levora | a0ad5c1 | 2019-03-28 17:45:55 +0100 | [diff] [blame] | 11 | name: "{{ nexus3_image }}" |
| 12 | load_path: "{{ infra_images_path }}/{{ nexus3_image_tar }}" |
Michal Zegan | 3a7e073 | 2018-12-19 11:51:26 +0100 | [diff] [blame] | 13 | state: present |
Michal Zegan | 8e5a7da | 2018-12-20 12:16:56 +0100 | [diff] [blame] | 14 | timeout: 120 |
Michal Zegan | 3a7e073 | 2018-12-19 11:51:26 +0100 | [diff] [blame] | 15 | |
| 16 | - name: Create nexus network |
| 17 | docker_network: |
| 18 | name: nexus_network |
| 19 | state: present |
| 20 | |
Tomáš Levora | a0ad5c1 | 2019-03-28 17:45:55 +0100 | [diff] [blame] | 21 | - name: Start nexus server container |
Michal Zegan | 3a7e073 | 2018-12-19 11:51:26 +0100 | [diff] [blame] | 22 | docker_container: |
| 23 | name: nexus |
Tomáš Levora | a0ad5c1 | 2019-03-28 17:45:55 +0100 | [diff] [blame] | 24 | image: "{{ nexus3_image }}" |
Michal Zegan | 3a7e073 | 2018-12-19 11:51:26 +0100 | [diff] [blame] | 25 | 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 Silvius | f6f5fc4 | 2019-02-13 11:00:39 +0200 | [diff] [blame] | 31 | |
| 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 |
| 39 | retries: 30 |
| 40 | delay: 10 |
| 41 | register: nexus_wait |
| 42 | until: not nexus_wait.failed |