summaryrefslogtreecommitdiffstats
path: root/ansible/roles/nexus/tasks/insert-images.yml
diff options
context:
space:
mode:
authorMichal Zegan <m.zegan@samsung.com>2018-12-19 11:51:26 +0100
committerMichal Zegan <m.zegan@samsung.com>2018-12-19 11:51:26 +0100
commit3a7e073323bf1fa24e9f45bd849fb7657f20e859 (patch)
treedeb476c420672c36d1ef15d513d5cc729c13454b /ansible/roles/nexus/tasks/insert-images.yml
parent6d14adbfcc125d3a17dd64ef1da0e3c2df27853f (diff)
Add nexus ansible role
This role deploys the internal nexus used as offline source of docker images/npm packages for onap. Change-Id: Iaf398eb03614749d2b3c100c241726144ccae1a0 Issue-ID: OOM-1551 Signed-off-by: Michal Zegan <m.zegan@samsung.com>
Diffstat (limited to 'ansible/roles/nexus/tasks/insert-images.yml')
-rw-r--r--ansible/roles/nexus/tasks/insert-images.yml19
1 files changed, 19 insertions, 0 deletions
diff --git a/ansible/roles/nexus/tasks/insert-images.yml b/ansible/roles/nexus/tasks/insert-images.yml
new file mode 100644
index 00000000..2e2a45c3
--- /dev/null
+++ b/ansible/roles/nexus/tasks/insert-images.yml
@@ -0,0 +1,19 @@
+---
+- name: Load docker images and push into registry
+ block:
+ - set_fact:
+ component: "{{ (item.path | basename | splitext)[0] }}"
+
+ - name: Docker login
+ docker_login:
+ registry: "{{ runtime_images[component].registry }}"
+ username: admin
+ password: admin123
+
+ - name: Load and push component {{ component }}
+ docker_image:
+ name: "{{ runtime_images[component].registry }}{{ runtime_images[component].path }}"
+ tag: "{{ runtime_images[component].tag }}"
+ push: yes
+ load_path: "{{ item.path }}"
+