Update ControlPersist to 60 min in kubespray
Default setting was 30 min and jobs start to fail randomly
if it takes longer. Theory was if it is more, there's possibility
of removing the files and reconnect. If it happens at a good time
the ssh connection is dropped.
Change-Id: If719f377dba9116dabf5e136235b41587146bdb7
diff --git a/engine/installer/kubespray/playbooks/roles/configure-installer/tasks/main.yml b/engine/installer/kubespray/playbooks/roles/configure-installer/tasks/main.yml
index 82fc596..52dd7f1 100644
--- a/engine/installer/kubespray/playbooks/roles/configure-installer/tasks/main.yml
+++ b/engine/installer/kubespray/playbooks/roles/configure-installer/tasks/main.yml
@@ -42,6 +42,13 @@
recursive: yes
delete: yes
+# update ControlPersist to 60m to inline with max time
+- name: Update ControlPersist in ansible config
+ lineinfile:
+ path: "{{ engine_cache }}/repos/kubespray/ansible.cfg"
+ regexp: "^ssh_args.*"
+ line: "ssh_args = -o ControlMaster=auto -o ControlPersist=60m -o ConnectionAttempts=100 -o UserKnownHostsFile=/dev/null"
+
# enable helm for all the scenarios using kubespray
- name: Enable helm
lineinfile: