diff --git a/docsite/rst/gettingstarted.rst b/docsite/rst/gettingstarted.rst index eacf49403d..c4fffd10ca 100644 --- a/docsite/rst/gettingstarted.rst +++ b/docsite/rst/gettingstarted.rst @@ -223,7 +223,7 @@ Tagged Releases Tarballs of releases are available on the ansible.cc page. -* `Ansible/downloads `_ +* `Ansible/downloads `_ These releases are also tagged in the git repository with the release version. diff --git a/lib/ansible/playbook/__init__.py b/lib/ansible/playbook/__init__.py index 8333c12ef4..cf88ba7d83 100644 --- a/lib/ansible/playbook/__init__.py +++ b/lib/ansible/playbook/__init__.py @@ -175,20 +175,23 @@ class PlayBook(object): (k,v) = t.split("=", 1) incvars[k] = utils.template(basedir, v, incvars) - included_path = utils.path_dwim(basedir, utils.template(basedir, tokens[0], incvars)) - (plays, basedirs) = self._load_playbook_from_file(included_path, incvars) - for p in plays: - # support for parameterized play includes works by passing - # those variables along to the subservient play - if 'vars' not in p: - p['vars'] = {} - if isinstance(p['vars'], dict): - p['vars'].update(incvars) - elif isinstance(p['vars'], list): - # nobody should really do this, but handle vars: a=1 b=2 - p['vars'].extend([dict(k=v) for k,v in incvars.iteritems()]) - accumulated_plays.extend(plays) - play_basedirs.extend(basedirs) + + included_path = utils.path_dwim(basedir, utils.template(basedir, tokens[0], incvars)) + (plays, basedirs) = self._load_playbook_from_file(included_path, incvars) + for p in plays: + # support for parameterized play includes works by passing + # those variables along to the subservient play + if 'vars' not in p: + p['vars'] = {} + if isinstance(p['vars'], dict): + p['vars'].update(incvars) + elif isinstance(p['vars'], list): + # nobody should really do this, but handle vars: a=1 b=2 + p['vars'].extend([dict(k=v) for k,v in incvars.iteritems()]) + + accumulated_plays.extend(plays) + play_basedirs.extend(basedirs) + else: # this is a normal (non-included play)