mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-10 18:34:03 -07:00
Ad-hoc command: fix 'any' call in play_ds (#49852)
* Ad-hoc command: fix 'any' call in play_ds * Unit test for ad-hoc cli * Review comments Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
parent
ef3b75afcd
commit
162d9497ba
2 changed files with 93 additions and 1 deletions
|
@ -80,7 +80,7 @@ class AdHocCLI(CLI):
|
|||
mytask = {'action': {'module': self.options.module_name, 'args': parse_kv(self.options.module_args, check_raw=check_raw)}}
|
||||
|
||||
# avoid adding to tasks that don't support it, unless set, then give user an error
|
||||
if self.options.module_name not in ('include_role', 'include_tasks') or any(async_val, poll):
|
||||
if self.options.module_name not in ('include_role', 'include_tasks') or any(frozenset((async_val, poll))):
|
||||
mytask['async_val'] = async_val
|
||||
mytask['poll'] = poll
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue