Question: what is the difference between shell and command modules in ansible?
Answer: Here are the main differences between these modules. With the Command module the command will be executed without being proceeded through a shell. ... The Shell module runs a command through a shell, by default /bin/sh. This can be changed with the option executable.