From 74107ff7ccd8dc23621c7072ae7a4008b29f6167 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Mon, 9 Oct 2017 15:52:52 -0400 Subject: [PATCH] better message for unsupported include/imports adhoc cannot currently execute these actions --- lib/ansible/cli/adhoc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/cli/adhoc.py b/lib/ansible/cli/adhoc.py index 8f1d706e96..54587912e3 100644 --- a/lib/ansible/cli/adhoc.py +++ b/lib/ansible/cli/adhoc.py @@ -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)