From 6924c6e5a32ae4a74fea19456e33c71287da50d6 Mon Sep 17 00:00:00 2001 From: Michael Shen Date: Wed, 20 Nov 2019 01:35:18 -0500 Subject: [PATCH] [FIX] fix match because trim removes leading/trailing whitespace (#5356) --- roles/kubernetes/master/tasks/kubeadm-setup.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/kubernetes/master/tasks/kubeadm-setup.yml b/roles/kubernetes/master/tasks/kubeadm-setup.yml index 619c14992..a8dd82f6d 100644 --- a/roles/kubernetes/master/tasks/kubeadm-setup.yml +++ b/roles/kubernetes/master/tasks/kubeadm-setup.yml @@ -127,7 +127,7 @@ with_items: "{{ hostvars[groups['kube-master'][0]]['kubeadm_init'].stdout_lines | default([]) }}" when: - kubeadm_certificate_key is not defined - - item | trim | match('.*--certificate-key .*') + - item | trim | match('.*--certificate-key.*') - name: Create hardcoded kubeadm token for joining nodes with 24h expiration (if defined) shell: >-