From 781b5691c9e7e08a23ad9313ae3541c669820ebc Mon Sep 17 00:00:00 2001 From: Waret <1804132+waret@users.noreply.github.com> Date: Mon, 15 Jul 2019 18:15:09 +0800 Subject: [PATCH] prep_kubeadm_images: parse repo and tag (#4976) (#4977) --- roles/download/tasks/prep_kubeadm_images.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/download/tasks/prep_kubeadm_images.yml b/roles/download/tasks/prep_kubeadm_images.yml index 2461626db..8182a0fce 100644 --- a/roles/download/tasks/prep_kubeadm_images.yml +++ b/roles/download/tasks/prep_kubeadm_images.yml @@ -57,8 +57,8 @@ value: enabled: true container: true - repo: "{{ item.split(':')[0] }}" - tag: "{{ item.split(':')[1] }}" + repo: "{{ item | regex_replace('^(.*):.*$','\\1') }}" + tag: "{{ item | regex_replace('^.*:(.*)$','\\1') }}" groups: k8s-cluster loop: "{{ kubeadm_images_list | flatten(levels=1) }}" register: kubeadm_images_cooked