From de70277173b049f0e7a09fdda3ca2173478b8ddd Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Tue, 17 Apr 2012 19:37:29 -0400 Subject: [PATCH] No need to save setup files to disk, this is what SETUP_CACHE effectively does. --- lib/ansible/runner.py | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/lib/ansible/runner.py b/lib/ansible/runner.py index 1fced2c589..7ce2275a7b 100755 --- a/lib/ansible/runner.py +++ b/lib/ansible/runner.py @@ -299,24 +299,6 @@ class Runner(object): # ***************************************************** - def _save_setup_result_to_disk(self, conn, result): - ''' cache results of calling setup ''' - - dest = os.path.expanduser("~/.ansible_setup_data") - user = getpass.getuser() - if user == 'root': - dest = "/var/lib/ansible/setup_data" - if not os.path.exists(dest): - os.makedirs(dest) - - fh = open(os.path.join(dest, conn.host), "w") - fh.write(result) - fh.close() - - return result - - # ***************************************************** - def _add_result_to_setup_cache(self, conn, result): ''' allows discovered variables to be used in templates and action statements ''' @@ -350,8 +332,6 @@ class Runner(object): if module_name == 'setup': self._add_result_to_setup_cache(conn, result) - if self.is_playbook: - self._save_setup_result_to_disk(conn, result) return self._return_from_module(conn, host, result, err, executed)