From 5a63a48e6bed1385d77785a9c3e98043b2eee343 Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Sun, 15 Jul 2012 10:24:38 -0400 Subject: [PATCH] No need to feed variables into the setup module for preservation since the file is no longer saved to disk. --- lib/ansible/runner/__init__.py | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/lib/ansible/runner/__init__.py b/lib/ansible/runner/__init__.py index da5e826bb5..f1c496bbae 100644 --- a/lib/ansible/runner/__init__.py +++ b/lib/ansible/runner/__init__.py @@ -235,26 +235,6 @@ class Runner(object): return remote # ***************************************************** - - def _add_setup_vars(self, inject, args): - ''' setup module variables need special handling ''' - - is_dict = False - if type(args) == dict: - is_dict = True - - # TODO: keep this as a dict through the whole path to simplify this code - for (k,v) in inject.iteritems(): - if not k.startswith('facter_') and not k.startswith('ohai_') and not k.startswith('ansible_'): - if not is_dict: - if str(v).find(" ") != -1: - v = "\"%s\"" % v - args += " %s=%s" % (k, str(v).replace(" ","~~~")) - else: - args[k]=v - return args - - # ***************************************************** def _execute_module(self, conn, tmp, remote_module_path, args, async_jid=None, async_module=None, async_limit=None): @@ -321,11 +301,6 @@ class Runner(object): inject['groups'] = group_hosts - if self.module_name == 'setup': - if not args: - args = {} - args = self._add_setup_vars(inject, args) - if type(args) == dict: args = utils.jsonify(args,format=True)