From 4638acfe81d8a3dd047af6eefed61b4bd4259d0f Mon Sep 17 00:00:00 2001 From: Matthew Mosesohn Date: Mon, 25 Feb 2019 09:50:55 +0300 Subject: [PATCH] Retry applying podsecurity policies (#4279) --- roles/kubernetes-apps/cluster_roles/tasks/main.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/roles/kubernetes-apps/cluster_roles/tasks/main.yml b/roles/kubernetes-apps/cluster_roles/tasks/main.yml index 58d373c8a..f58dda1bb 100644 --- a/roles/kubernetes-apps/cluster_roles/tasks/main.yml +++ b/roles/kubernetes-apps/cluster_roles/tasks/main.yml @@ -46,6 +46,10 @@ resource: "{{item.item.type}}" filename: "{{kube_config_dir}}/{{item.item.file}}" state: "latest" + register: result + until: result is succeeded + retries: 10 + delay: 6 with_items: "{{ psp_manifests.results }}" when: - inventory_hostname == groups['kube-master'][0] @@ -69,6 +73,10 @@ resource: "clusterrolebinding" filename: "{{ kube_config_dir }}/node-crb.yml" state: latest + register: result + until: result is succeeded + retries: 10 + delay: 6 when: - rbac_enabled - node_crb_manifest.changed