[FIX] fix match because trim removes leading/trailing whitespace (#5356)

This commit is contained in:
Michael Shen 2019-11-20 01:35:18 -05:00 committed by Kubernetes Prow Robot
parent 85c851f519
commit 6924c6e5a3

View file

@ -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: >-