diff options
author | Michal Ptacek <m.ptacek@partner.samsung.com> | 2018-12-19 13:12:03 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2018-12-19 13:12:03 +0000 |
commit | 0a790f7fcf9d20b5cf731f1d505049fabe0a0b96 (patch) | |
tree | 8b5d7c96dc35b5f0d3525c84c38183b37e1e4a1a /ansible/roles/nexus/tasks/install.yml | |
parent | a0eff59859eba3afe8f4c8966f768e14f41aaf96 (diff) | |
parent | 3a7e073323bf1fa24e9f45bd849fb7657f20e859 (diff) |
Merge "Add nexus ansible role"
Diffstat (limited to 'ansible/roles/nexus/tasks/install.yml')
-rw-r--r-- | ansible/roles/nexus/tasks/install.yml | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/ansible/roles/nexus/tasks/install.yml b/ansible/roles/nexus/tasks/install.yml new file mode 100644 index 00000000..6dc82fe6 --- /dev/null +++ b/ansible/roles/nexus/tasks/install.yml @@ -0,0 +1,29 @@ +--- +- name: Change ownership of nexus_data + file: + path: "{{ app_data_path }}/nexus_data" + owner: 200 + group: 200 + recurse: yes + +- name: Load nexus image + docker_image: + name: sonatype/nexus3 + load_path: "{{ app_data_path }}/offline_data/docker_images_infra/sonatype_nexus3_latest.tar" + state: present + +- name: Create nexus network + docker_network: + name: nexus_network + state: present + +- name: Run nexus container + docker_container: + name: nexus + image: sonatype/nexus3 + networks: + - name: nexus_network + volumes: + - "{{ app_data_path }}/nexus_data:/nexus-data:rw" + state: started + restart_policy: unless-stopped |