Skip to content

Commit

Permalink
better message for unsupported include/imports
Browse files Browse the repository at this point in the history
adhoc cannot currently execute these actions
  • Loading branch information
bcoca authored and abadger committed Oct 10, 2017
1 parent aade523 commit 74107ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ansible/cli/adhoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def run(self):
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)
Expand Down

0 comments on commit 74107ff

Please sign in to comment.