From a31a74e1698d1327bd202a4f2bd9cbaab5a2671e Mon Sep 17 00:00:00 2001 From: Paul Belanger Date: Mon, 20 Jun 2016 15:38:27 -0400 Subject: [PATCH] Enable keep_remote_files in ansible.cfg When ansible is not using pipelining, files are copied to the remote worker then run locally on said worker. Ansible being the good program that it is, attempts to clean up these files once finished with them. As a results, it may be possible for ansible async to delete these files before actually executing them[1]. Consideration should be taken for long lived workers, as we may want to update our remote_tmp setting to use the /tmp folder. We can discuss that in a follow up patch. [1] https://github.com/ansible/ansible/issues/10855 Change-Id: Idb1efcdde9d6fe6d74fc2131a4fecddcd1e46904 Signed-off-by: Paul Belanger --- zuul/launcher/ansiblelaunchserver.py | 1 + 1 file changed, 1 insertion(+) diff --git a/zuul/launcher/ansiblelaunchserver.py b/zuul/launcher/ansiblelaunchserver.py index 6f48a05bc7..feca816961 100644 --- a/zuul/launcher/ansiblelaunchserver.py +++ b/zuul/launcher/ansiblelaunchserver.py @@ -1192,6 +1192,7 @@ class NodeWorker(object): config.write('[defaults]\n') config.write('hostfile = %s\n' % jobdir.inventory) config.write('host_key_checking = False\n') + config.write('keep_remote_files = True\n') config.write('local_tmp = %s/.ansible/tmp\n' % jobdir.root) config.write('private_key_file = %s\n' % self.private_key_file) config.write('retry_files_enabled = False\n')