Hi,
I am currently just trying stuff on the command line, I will do the playbook later.
Ansible 2.2.1.0 on centos7.
Trying to run a command on a windows 10 PC.
ansible mesh -u user -k -m win_ping
SSH password:
mesh | SUCCESS => {
“changed”: false,
“ping”: “pong”
}
So that works. But if I run
ansible mesh -u user -k -m win_command -a ‘ng build chdir=C:\Temp\angularjs_example\angular2\heroes_new’
SSH password:
mesh | FAILED | rc=2 >>
The system cannot find the file specified
or
ansible mesh -u user -k -m win_shell -a “ng build chdir=C:\Temp\angularjs_example\angular2\heroes_new”
SSH password:
mesh | FAILED | rc=267 >>
The directory name is invalid
Now the folder does exist. I have tried with escaping backslashes, in double quotes, with forward quotes. All with the same result.
Any ideas what I am doing wrong?
Regards
Try double backslashes in the windows style path names - these are usually needed when double quoting module parameters.
Hope this helps,
Jon
Hi Jon,
ansible mesh -u user -k -m win_shell -a “ng build chdir=C:\Temp\angularjs_example\angular2\heroes_new”
SSH password:
mesh | FAILED | rc=267 >>
The directory name is invalid
But strangely, this does work
ansible mesh -u user-k -m win_shell -a “dir chdir=C:\Temp”
SSH password:
mesh | SUCCESS | rc=0 >>
Directory: C:\Temp
Mode LastWriteTime Length Name
d----- 16/02/2017 10:34 angularjs_example
So then tried
ansible mesh -u user -k -m win_shell -a “ng build chdir=C:\Temp\\angularjs_example\\angular2\\heroes_new”
SSH password:
mesh | FAILED | rc=1 >>
Hash: 7fac7ff8ebe8aa19c58e
Time: 14561ms
chunk {0} main.bundle.js, main.bundle.map (main) 50 kB {2} [initial] [rendered]
chunk {1} styles.bundle.js, styles.bundle.map (styles) 11.7 kB {3} [initial] [rendered]
chunk {2} vendor.bundle.js, vendor.bundle.map (vendor) 2.37 MB [initial] [rendered]
chunk {3} inline.bundle.js, inline.bundle.map (inline) 0 bytes [entry] [rendered]
ERROR in compiler_1.StaticSymbolCache is not a constructor
And that does work. The error is a current problem in angular 2 …
Many thanks for your help.