From 2acc5a75acbe2081420a00fe9a5f4f19efd5ccc9 Mon Sep 17 00:00:00 2001 From: Mario Bris <38427872+mariobris@users.noreply.github.com> Date: Tue, 4 Aug 2020 10:40:22 +0200 Subject: [PATCH] fix test if openstack_cacert is a base64 string (#6371) --- 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 70ea0090d..9af3d7cbc 100644 --- a/roles/kubernetes/node/tasks/main.yml +++ b/roles/kubernetes/node/tasks/main.yml @@ -189,7 +189,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'