From a78e861a89e1c7b22fc6543337d9a191fb4228cb Mon Sep 17 00:00:00 2001 From: Florian Ruynat Date: Thu, 30 Jul 2020 22:15:17 +0200 Subject: [PATCH] Fix test if openstack_cacert is a base64 string (#6421) --- roles/kubernetes/node/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/kubernetes/node/tasks/main.yml b/roles/kubernetes/node/tasks/main.yml index b2e78e4c6..8c1659f76 100644 --- a/roles/kubernetes/node/tasks/main.yml +++ b/roles/kubernetes/node/tasks/main.yml @@ -190,7 +190,7 @@ - name: Test if openstack_cacert is a base64 string set_fact: - openstack_cacert_is_base64: "{% if openstack_cacert | b64decode %}true{% else %}false{% endif %}" + openstack_cacert_is_base64: "{% if openstack_cacert | search ('^([A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{2}==)?$') %}true{% else %}false{% endif %}" when: - cloud_provider is defined - cloud_provider == 'openstack'