Commit c5d98234 by Michael DeHaan

Fix some items related to playbook includes and indentation.

parent 290780d1
...@@ -223,7 +223,7 @@ Tagged Releases ...@@ -223,7 +223,7 @@ Tagged Releases
Tarballs of releases are available on the ansible.cc page. Tarballs of releases are available on the ansible.cc page.
* `Ansible/downloads <https://ansible.cc/releases>`_ * `Ansible/downloads <http://ansible.cc/releases>`_
These releases are also tagged in the git repository with the release version. These releases are also tagged in the git repository with the release version.
......
...@@ -175,6 +175,7 @@ class PlayBook(object): ...@@ -175,6 +175,7 @@ class PlayBook(object):
(k,v) = t.split("=", 1) (k,v) = t.split("=", 1)
incvars[k] = utils.template(basedir, v, incvars) incvars[k] = utils.template(basedir, v, incvars)
included_path = utils.path_dwim(basedir, utils.template(basedir, tokens[0], incvars)) included_path = utils.path_dwim(basedir, utils.template(basedir, tokens[0], incvars))
(plays, basedirs) = self._load_playbook_from_file(included_path, incvars) (plays, basedirs) = self._load_playbook_from_file(included_path, incvars)
for p in plays: for p in plays:
...@@ -187,8 +188,10 @@ class PlayBook(object): ...@@ -187,8 +188,10 @@ class PlayBook(object):
elif isinstance(p['vars'], list): elif isinstance(p['vars'], list):
# nobody should really do this, but handle vars: a=1 b=2 # nobody should really do this, but handle vars: a=1 b=2
p['vars'].extend([dict(k=v) for k,v in incvars.iteritems()]) p['vars'].extend([dict(k=v) for k,v in incvars.iteritems()])
accumulated_plays.extend(plays) accumulated_plays.extend(plays)
play_basedirs.extend(basedirs) play_basedirs.extend(basedirs)
else: else:
# this is a normal (non-included play) # this is a normal (non-included play)
......
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