Hi all,
I have followed the instructions on Ansible docs on how to do a windows copy from local linux to remote windows.
However i encounter error with no head nor tail what the issue is. I can confirm the script is able to find the app.zip file as when i changed the name to app2.zip, the ansible error thrown is unable to locate app2.zip file.
Error:
-----
fatal: [localhost]: FAILED! => {"changed": false, "checksum": "8baeccfaacc8ce4feacf9d163336e4bcb5b0bda8", "dest": "C:\\inetpub\\wwwroot\\", "module_stderr": "", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "operation": "file_copy", "original_basename": "app.zip", "rc": 0, "size": 11725372, "src": "app.zip"}
My playbook as below:
-----
- name: Deploy to test instances
hosts: localhost
vars_files:
- "group_vars/test"
- group_vars/all
tasks:
- name: Wait for WinRM to answer on all hosts
wait_for:
port: 5986
host: "xx.xx.xx.xx"
timeout: 300
- name: copy app zip file to app server
win_copy:
src: app register: copyfiletime
dest: C:\inetpub\wwwroot\
register: copyfiletime
- debug: msg={{ copyfiletime.stdout }}
- debug: msg={{ copyfiletime.stderr }}
Can anyone here advise if i have missed out any step or configuration?