Upgraded variable support met with upgraded conditional support, see examples/playbooks/upgraded_vars.yml

for details!
This commit is contained in:
Michael DeHaan 2013-04-05 19:10:32 -04:00
parent 38c2b14339
commit f585c4cde7
6 changed files with 58 additions and 25 deletions

View file

@ -71,6 +71,8 @@ class Task(object):
else:
raise errors.AnsibleError("cannot find lookup plugin named %s for usage in with_%s" % (plugin_name, plugin_name))
elif x == 'when':
ds['when'] = "jinja2_compare %s" % (ds[x])
elif x.startswith("when_"):
if 'when' in ds:
raise errors.AnsibleError("multiple when_* statements specified in task %s" % (ds.get('name', ds['action'])))