1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Catch a missing include_vars filename

Related to ansible/ansible-modules-core#4445
This commit is contained in:
James Cammarata 2016-08-17 09:35:37 -05:00
parent e0bdb502e3
commit 732d722a7f

View file

@ -31,6 +31,10 @@ class ActionModule(ActionBase):
source = self._task.args.get('file')
if not source:
source = self._task.args.get('_raw_params')
if source is None:
raise AnsibleError("No filename was found for the included vars. " + \
"Use `- include_vars: <filename>` or the `file:` option " + \
"to specify the vars filename.", self._task._ds)
if task_vars is None:
task_vars = dict()