From 07ecef86e3f81e17221d89f8ea64ce54328ebfea Mon Sep 17 00:00:00 2001 From: Michael Oglesby <44730324+mboglesby@users.noreply.github.com> Date: Thu, 22 Aug 2019 05:40:32 -0400 Subject: [PATCH] Replace fetch with synchronize due to memory error (#5084) Fix for Kubespray Issue #5059 (https://github.com/kubernetes-sigs/kubespray/issues/5059). There is a known issue with the 'fetch' module that will sometimes lead to it failing with a memory error. See ansible/ansible#11702 (https://github.com/ansible/ansible/issues/11702). I encountered this issue with the "Copy kubectl binary to ansible host" task in kubespray/roles/kubernetes/client/tasks/main.yml, and it caused my entire deployment to error out (see "Output of ansible run" above). Replacing 'fetch' with 'synchronize' fixes this issue. --- roles/kubernetes/client/tasks/main.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/roles/kubernetes/client/tasks/main.yml b/roles/kubernetes/client/tasks/main.yml index 02dc1a6fa..0932c6d42 100644 --- a/roles/kubernetes/client/tasks/main.yml +++ b/roles/kubernetes/client/tasks/main.yml @@ -90,11 +90,9 @@ when: kubeconfig_localhost|default(false) - name: Copy kubectl binary to ansible host - fetch: + synchronize: src: "{{ bin_dir }}/kubectl" dest: "{{ artifacts_dir }}/kubectl" - flat: yes - validate_checksum: no become: no run_once: yes when: kubectl_localhost|default(false)