|
|
@ -47,6 +47,13 @@ class Task(object):
|
|
|
|
if x in utils.plugins.module_finder:
|
|
|
|
if x in utils.plugins.module_finder:
|
|
|
|
if 'action' in ds:
|
|
|
|
if 'action' in ds:
|
|
|
|
raise errors.AnsibleError("multiple actions specified in task %s" % (ds.get('name', ds['action'])))
|
|
|
|
raise errors.AnsibleError("multiple actions specified in task %s" % (ds.get('name', ds['action'])))
|
|
|
|
|
|
|
|
if isinstance(ds[x], dict):
|
|
|
|
|
|
|
|
if 'args' in ds:
|
|
|
|
|
|
|
|
raise errors.AnsibleError("can't combine args: and a dict for %s: in task %s" % (x, ds.get('name', "%s: %s" % (x, ds[x]))))
|
|
|
|
|
|
|
|
ds['args'] = ds[x]
|
|
|
|
|
|
|
|
ds[x] = ''
|
|
|
|
|
|
|
|
elif ds[x] is None:
|
|
|
|
|
|
|
|
ds[x] = ''
|
|
|
|
if not isinstance(ds[x], basestring):
|
|
|
|
if not isinstance(ds[x], basestring):
|
|
|
|
raise errors.AnsibleError("action specified for task %s has invalid type %s" % (ds.get('name', "%s: %s" % (x, ds[x])), type(ds[x])))
|
|
|
|
raise errors.AnsibleError("action specified for task %s has invalid type %s" % (ds.get('name', "%s: %s" % (x, ds[x])), type(ds[x])))
|
|
|
|
ds['action'] = x + " " + ds[x]
|
|
|
|
ds['action'] = x + " " + ds[x]
|
|
|
|