Hi,
Refer to shell module doc, current it use /bin/sh to execute shell command, most time it works fine, but for following example, the result from Ubuntu is different.
- shell: command -v nwef
Since in Ubuntu, /bin/sh → dash, the command will return 127, not 1
$ cat test.sh
command -v nwef
echo $?
$ sh test.sh
127
$ ./test.sh
1
$ bash test.sh
1
I don’t know why dash return 127, it will cause result is not consistent in different platform.
If shell module move to bash, the result will be same in different Platform, and bash exist in most platform.
Thanks,
Linbo