Quoting from the documentation of the command module:
"The given command will be executed on all selected nodes. It
will not be processed through the shell, so variables like
$HOME and operations like "<", ">", "|", ";" and "&" will not
work (use the shell module if you need these features)."
*- name: Check the Application version*
* command: /usr/bin/myscrpit.sh APPLICATIONNAME status | grep
Version*
* register: version*