Got a question about the "shell" module, when used in a playbook.
Primary what I'm seeking is an explanation of the "cmd" parameter when used with
the "shell" module. ansible-doc shell ain't giving me very much to sink my teeth
What do I get when using the "cmd" parameter, that I don't get without using it.
shell: touch file1
cmd: touch file1
I used both formats in a playbook, and the results were the same.
Thanks in advance. Hope you're safe and well!!!
Hello @Trevor ,
I believe it is just a matter of syntax.
If you take a look in the documentation "ansible-doc shell" you can see it works both ways: "The `shell' module takes the command name followed by a list of space-delimited arguments. Either a free form command or `cmd' parameter is required,". Furthermore, according to the documentation, there is no mandatory option, which means you can use the module without giving any option.