From 7ff63ab7549bdc852458d157d957cfea0bcef8de Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Mon, 4 Aug 2014 13:11:32 -0400 Subject: [PATCH] Revert "Use atomic move function on known host file in paramiko to prevent rare occurance of Control-C" This reverts commit 642b183fb6b0632167130774c2ebfc44d88ac278. --- lib/ansible/runner/connection_plugins/paramiko_ssh.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/lib/ansible/runner/connection_plugins/paramiko_ssh.py b/lib/ansible/runner/connection_plugins/paramiko_ssh.py index 810dff5c4e0..e71d0824b6e 100644 --- a/lib/ansible/runner/connection_plugins/paramiko_ssh.py +++ b/lib/ansible/runner/connection_plugins/paramiko_ssh.py @@ -381,13 +381,7 @@ class Connection(object): self.ssh.load_system_host_keys() self.ssh._host_keys.update(self.ssh._system_host_keys) - - # save the new keys to a temporary file and move it into place - # rather than rewriting the file - tmp_keyfile = tempfile.NamedTemporaryFile() - self._save_ssh_host_keys(tmp_keyfile) - atomic_move(tmp_keyfile.name, self.keyfile) - tmp_keyfile.close() + self._save_ssh_host_keys(self.keyfile) except: