Please find my YAML below
*******************************************************
---
- hosts: all
vars:
tasks:
- name: Save the result of 'whoami' in 'whoami_out'
win_command: groovy c:\AnsibletestWorkspace\deploy_latest.groovy
register: whoami_out
************************************************************************************************
It adds an additional slash(c:\\AnsibleMaximoWorkspace\\deploy_latest.groovy) to the windows path the tell cannot find the path specified. I tried with backslash then it's not add the double slash but still trown the error path to the file not found.
I tried all the different combinations for specfy the path but no luck.