Do not use the variable name as a key for the result of the module
Using the variable name can interfere with various systems used to communicate between modules and ansible ( as reported in #7732 , where ansible_facts is a reserved key for updating the fact cache, for example ).
This commit is contained in:
parent
12968acd5f
commit
9b8a55032d
1 changed files with 1 additions and 1 deletions
|
@ -52,7 +52,7 @@ class ActionModule(object):
|
|||
result = dict(msg=args['msg'])
|
||||
elif 'var' in args and not utils.LOOKUP_REGEX.search(args['var']):
|
||||
results = template.template(self.basedir, args['var'], inject, convert_bare=True)
|
||||
result[args['var']] = results
|
||||
result['var'] = { args['var']: results }
|
||||
|
||||
# force flag to make debug output module always verbose
|
||||
result['verbose_always'] = True
|
||||
|
|
Loading…
Reference in a new issue