Commit cedbcfcc by Jonathan Palley

adds 'groups' variable, essentially making hosts file accessible as a variable

parent 3d7a51f2
......@@ -290,6 +290,12 @@ class Runner(object):
inject.update(host_variables)
inject.update(self.module_vars)
group_hosts = {}
for g in self.inventory.groups:
group_hosts[g.name] = map((lambda x: x.get_variables()),g.hosts)
inject['groups'] = group_hosts
if self.module_name == 'setup':
if not args:
args = {}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment