mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
better message for unsupported include/imports
adhoc cannot currently execute these actions
This commit is contained in:
parent
aade5234a9
commit
74107ff7cc
1 changed files with 1 additions and 1 deletions
|
@ -138,7 +138,7 @@ class AdHocCLI(CLI):
|
|||
raise AnsibleOptionsError(err)
|
||||
|
||||
# Avoid modules that don't work with ad-hoc
|
||||
if self.options.module_name in ('include', 'include_role'):
|
||||
if self.options.module_name.startswith(('include', 'import_')):
|
||||
raise AnsibleOptionsError("'%s' is not a valid action for ad-hoc commands" % self.options.module_name)
|
||||
|
||||
play_ds = self._play_ds(pattern, self.options.seconds, self.options.poll_interval)
|
||||
|
|
Loading…
Reference in a new issue