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