CORD-1732 Fix publish of images managed by ImageBuilder

Change-Id: Id3dd6315b5c88e336e07beace07eb89465a1b90c
diff --git a/roles/imagebuilder-publish/tasks/main.yml b/roles/imagebuilder-publish/tasks/main.yml
index 58ad4f2..1ddf28e 100644
--- a/roles/imagebuilder-publish/tasks/main.yml
+++ b/roles/imagebuilder-publish/tasks/main.yml
@@ -17,13 +17,13 @@
 ---
 - name: Remove old local images
   docker_image:
-    name: "{{ deploy_docker_registry }}/{{ item.tags[0].split(':')[0] }}:{{ deploy_docker_tag }}"
+    name: "{{ deploy_docker_registry }}/{{ item.base }}:{{ deploy_docker_tag }}"
     state: absent
   with_items: "{{ ib_built }} + {{ ib_pulled }}"
 
 - name: Tag and push the images managed by ImageBuilder
   docker_image:
-    name: "{{ item.tags[0].split(':')[0] }}:{{ build_docker_tag }}"
-    repository: "{{ deploy_docker_registry }}/{{ item.tags[0].split(':')[0] }}:{{ deploy_docker_tag }}"
+    name: "{{ item.base }}:{{ build_docker_tag }}"
+    repository: "{{ deploy_docker_registry }}/{{ item.base }}:{{ deploy_docker_tag }}"
     push: True
-  with_items: "{{ ib_built }} + {{ ib_pulled }}"
\ No newline at end of file
+  with_items: "{{ ib_built }} + {{ ib_pulled }}"