I am connecting to windows host via ansible. But I am getting from win_shell an error.
[as_user@tt ansible-winconnect]$ ansible-playbook -i WIN win_conn.yml -t echo_test --ask-pass -vvvv
fatal: [x.x.x.x]: FAILED! => {
"changed": true,
"cmd": "echo %HOMEDIR% > print.txt",
"delta": "0:00:00.287028",
"end": "2017-05-25 11:38:05.603907",
"failed": true,
"rc": 1,
"start": "2017-05-25 11:38:05.316878",
"stderr": "Thread failed to start.\r\n",
"stderr_lines": [
"Thread failed to start."
],
"stdout": "",
"stdout_lines": []
}
[as_user@tt ansible-winconnect]$ cat win-conn/tasks/main.yml
---
- name: Print Home Dir in a file
win_shell: echo %HOMEDIR% > print.txt
tags: echo_test