fix: handle command module argv syntax

Fixes: #47
This commit is contained in:
Robert Kaussow 2020-12-30 15:45:54 +01:00
parent 6110d9cafd
commit 0a1948da14
Signed by: xoxys
GPG Key ID: 65362AE74AF98B61
1 changed files with 2 additions and 0 deletions

View File

@ -120,6 +120,8 @@ def check_command_instead_of_module(candidate, settings):
if task["action"]["__ansible_module__"] in commands:
if "cmd" in task["action"]:
first_cmd_arg = task["action"]["cmd"].split()[0]
elif "argv" in task["action"]:
first_cmd_arg = task["action"]["argv"][0]
else:
first_cmd_arg = task["action"]["__ansible_arguments__"][0]