Fix playbooks such that they work with external inventory scripts. We really want to find out why the 'all'

group isn't available, but group vars don't make sense for external inventory anyway.
pull/316/merge
Michael DeHaan 13 years ago
parent 3fb2d38514
commit c804752835

@ -108,11 +108,12 @@ class PlayBook(object):
if override_hosts is not None:
if type(override_hosts) != list:
raise errors.AnsibleError("override hosts must be a list")
if not self.inventory._is_script:
self.global_vars.update(ansible.inventory.Inventory(host_list).get_group_variables('all'))
self.inventory = ansible.inventory.Inventory(override_hosts)
else:
self.inventory = ansible.inventory.Inventory(host_list)
if not self.inventory._is_script:
self.global_vars.update(ansible.inventory.Inventory(host_list).get_group_variables('all'))
self.basedir = os.path.dirname(playbook)

Loading…
Cancel
Save