Reputation: 11304
I'm just reading the script
module documentation, and I don't understand what the cmd
property is good for. The documentation states that script
:
The script module takes the script name followed by a list of space-delimited arguments.
Where cmd
also takes a script followed by a list of arguments.
Can someone explain the difference?
Upvotes: 0
Views: 155
Reputation: 6168
It is just a formatting option. The following two tasks are functionally identical:
- name: Run a script with arguments (using 'cmd' parameter)
script:
cmd: /some/local/script.sh --some-argument 1234
- name: Run a script with arguments (freeform)
script: /some/local/create_file.sh --some-argument 1234
Upvotes: 2