Fixing a few bugs in the HostVars performance areas

* Also refresh inventory in the HostVars manager process when things
  are changed via add_host/group_by
* Raise j2undefined rather than return it
This commit is contained in:
James Cammarata 2015-11-17 09:15:10 -05:00
parent 4d024fc82a
commit 9f31c073fe
4 changed files with 13 additions and 6 deletions

View file

@ -246,11 +246,13 @@ class StrategyBase:
new_host_info = result_item.get('add_host', dict())
self._add_host(new_host_info, iterator)
self._tqm._hostvars_manager.hostvars().set_inventory(self._inventory)
elif result[0] == 'add_group':
host = result[1]
result_item = result[2]
self._add_group(host, result_item)
self._tqm._hostvars_manager.hostvars().set_inventory(self._inventory)
elif result[0] == 'notify_handler':
task_result = result[1]