From 8cc9583949d3d352b05041bee620612455dafbcd Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Wed, 16 Sep 2020 11:04:52 +0200 Subject: [PATCH] allow 'shell' module if 'args.executable' is used --- CHANGELOG.md | 6 +++--- ansiblelater/rules/ansiblefiles.py | 5 +++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7a40c94..9dee29f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,3 @@ -- INTERNAL - - upgrade CI pipeline to use Hugo v0.74.3 - - publish to dockerhub and quay.io +- BUGFIX + - ANSIBLE0010 - allow `shell` module if `args.executable` is used + as this parameter is no longer support by command module diff --git a/ansiblelater/rules/ansiblefiles.py b/ansiblelater/rules/ansiblefiles.py index 5f91fe4..9e13f07 100644 --- a/ansiblelater/rules/ansiblefiles.py +++ b/ansiblelater/rules/ansiblefiles.py @@ -165,6 +165,11 @@ def check_shell_instead_command(candidate, settings): if not errors: for task in tasks: if task["action"]["__ansible_module__"] == "shell": + # skip processing if args.executable is used as this + # parameter is no longer support by command module + if "executable" in task["action"]: + continue + if "cmd" in task["action"]: cmd = task["action"].get("cmd", []) else: