No need to feed variables into the setup module for preservation since the file is no longer saved to disk.

This commit is contained in:
Michael DeHaan 2012-07-15 10:24:38 -04:00
parent 227c500ad7
commit 5a63a48e6b

View file

@ -236,26 +236,6 @@ class Runner(object):
# *****************************************************
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)