We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
shell
executable
1 parent e6126f2 commit 951a828Copy full SHA for 951a828
src/ansiblelint/rules/command_instead_of_shell.py
@@ -116,6 +116,12 @@ def matchtask(
116
# Use unjinja so that we don't match on jinja filters
117
# rather than pipes
118
if task["action"]["__ansible_module__"] in ["shell", "ansible.builtin.shell"]:
119
+ # Since Ansible 2.4, the `command` module does not accept setting
120
+ # the `executable`. If the user needs to set it, they have to use
121
+ # the `shell` module.
122
+ if "executable" in task["action"]:
123
+ return False
124
+
125
if "cmd" in task["action"]:
126
jinja_stripped_cmd = self.unjinja(task["action"].get("cmd", []))
127
else:
0 commit comments