Catch a missing filename in include_vars
Fixes ansible/ansible-modules-core#4445
This commit is contained in:
parent
8312df1512
commit
77fe1ac7af
1 changed files with 2 additions and 0 deletions
|
@ -34,6 +34,8 @@ class ActionModule(ActionBase):
|
|||
result = super(ActionModule, self).run(tmp, task_vars)
|
||||
|
||||
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:
|
||||
source = self._loader.path_dwim_relative(self._task._role._role_path, 'vars', source)
|
||||
|
|
Loading…
Reference in a new issue