blob: 6dc82fe6a5e9e6a3dca5d37f452dc7404edc93bb [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
7 recurse: yes
8
9- name: Load nexus image
10 docker_image:
11 name: sonatype/nexus3
12 load_path: "{{ app_data_path }}/offline_data/docker_images_infra/sonatype_nexus3_latest.tar"
13 state: present
14
15- name: Create nexus network
16 docker_network:
17 name: nexus_network
18 state: present
19
20- name: Run nexus container
21 docker_container:
22 name: nexus
23 image: sonatype/nexus3
24 networks:
25 - name: nexus_network
26 volumes:
27 - "{{ app_data_path }}/nexus_data:/nexus-data:rw"
28 state: started
29 restart_policy: unless-stopped