Catch a missing filename in include_vars

Fixes ansible/ansible-modules-core#4445
pull/16670/merge
James Cammarata 8 years ago
parent 8312df1512
commit 77fe1ac7af

@ -34,6 +34,8 @@ class ActionModule(ActionBase):
result = super(ActionModule, self).run(tmp, task_vars) result = super(ActionModule, self).run(tmp, task_vars)
source = self._task.args.get('_raw_params') source = self._task.args.get('_raw_params')
if source is None:
raise AnsibleError("No filename was specified to include.", self._task._ds)
if self._task._role: if self._task._role:
source = self._loader.path_dwim_relative(self._task._role._role_path, 'vars', source) source = self._loader.path_dwim_relative(self._task._role._role_path, 'vars', source)

Loading…
Cancel
Save