summaryrefslogtreecommitdiffstats
path: root/ansible/test/roles/prepare-nexus/tasks
diff options
context:
space:
mode:
authorBartek Grzybowski <b.grzybowski@partner.samsung.com>2019-06-13 11:41:24 +0200
committerBartek Grzybowski <b.grzybowski@partner.samsung.com>2019-06-24 14:57:29 +0200
commit7238ccf32f392fb7805e1ae2f3f951c39237de57 (patch)
treef42c973a75b07bb0bc63beac6013cbd8e405e972 /ansible/test/roles/prepare-nexus/tasks
parent70f9f3024318d7e85c3dabe430175dcf03540a0e (diff)
Add cleanup stage to 'nexus' role test
List of docker images to download/cleanup by the prepare and cleanup stages is now defined in one place (prepare-nexus role defaults) for clarity and ease of management. Change-Id: I4c18912fd8c5eadc4d68e1bc10f5c2251d58634e Issue-ID: OOM-1915 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
Diffstat (limited to 'ansible/test/roles/prepare-nexus/tasks')
-rw-r--r--ansible/test/roles/prepare-nexus/tasks/main.yml55
1 files changed, 9 insertions, 46 deletions
diff --git a/ansible/test/roles/prepare-nexus/tasks/main.yml b/ansible/test/roles/prepare-nexus/tasks/main.yml
index 5eb1b7d3..951bc28e 100644
--- a/ansible/test/roles/prepare-nexus/tasks/main.yml
+++ b/ansible/test/roles/prepare-nexus/tasks/main.yml
@@ -18,53 +18,16 @@
- "{{ infra_images_path }}"
- "{{ aux_data_path }}"
-- name: Download and archive nexus docker image for the nexus role to use
+- name: Download and archive docker images for the nexus role to use
delegate_to: localhost
docker_image:
- name: "{{ nexus3_image }}"
- archive_path: /tmp/nexus.tar
+ name: "{{ item.name }}"
+ tag: "{{ item.tag | default('latest') }}" # Tag given in 'name' has precedence over the one declared here
+ archive_path: "{{ item.archive_path }}"
+ loop: "{{ prepare_nexus_images }}"
-- name: Download and tag additional (busybox) docker image for the nexus role to populate into
- delegate_to: localhost
- docker_image:
- name: busybox
- tag: latest
- repository: nexus3.onap.org:10001/busybox
-
-- name: Save busybox image
- delegate_to: localhost
- docker_image:
- name: nexus3.onap.org:10001/busybox
- tag: latest
- pull: false
- archive_path: /tmp/busybox.tar
-
-- name: Download and tag additional (aaionap/haproxy) docker image for the nexus role to populate into nexus
- delegate_to: localhost
- docker_image:
- name: aaionap/haproxy
- tag: 1.2.4
- repository: nexus3.onap.org:10001/aaionap/haproxy
-
-- name: Save haproxy image
- delegate_to: localhost
- docker_image:
- name: nexus3.onap.org:10001/aaionap/haproxy
- tag: 1.2.4
- pull: false
- archive_path: /tmp/haproxy.tar
-
-- name: Copy nexus image to node
- copy:
- src: /tmp/nexus.tar
- dest: "{{ infra_images_path }}/{{ nexus3_image_tar }}"
-
-- name: Copy busybox image to node
- copy:
- src: /tmp/busybox.tar
- dest: "{{ aux_data_path }}/busybox.tar"
-
-- name: Copy haproxy image to node
+- name: Copy docker images to node
copy:
- src: /tmp/haproxy.tar
- dest: "{{ aux_data_path }}/aaionap-haproxy.tar"
+ src: "{{ item.archive_path }}"
+ dest: "{{ item.dest }}"
+ loop: "{{ prepare_nexus_images }}"