mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
A better error message for «ansible playbook.yml»
This is a very conservative change: we add the hint only if we're definitely going to die already.
This commit is contained in:
parent
3a4dd523d3
commit
65d62090c2
1 changed files with 4 additions and 1 deletions
|
@ -116,7 +116,10 @@ class AdHocCLI(CLI):
|
|||
return 0
|
||||
|
||||
if self.options.module_name in C.MODULE_REQUIRE_ARGS and not self.options.module_args:
|
||||
raise AnsibleOptionsError("No argument passed to %s module" % self.options.module_name)
|
||||
err = "No argument passed to %s module" % self.options.module_name
|
||||
if pattern.endswith(".yml"):
|
||||
err = err + ' (did you mean to run ansible-playbook?)'
|
||||
raise AnsibleOptionsError(err)
|
||||
|
||||
#TODO: implement async support
|
||||
#if self.options.seconds:
|
||||
|
|
Loading…
Reference in a new issue