Hi all,
I have followed the instructions on Ansible docs on how to do a windows
copy from local linux to remote windows.
https://docs.ansible.com/ansible/latest/modules/win_copy_module.html
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?
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/eef93a52-1ae6-4303-a104-21bc6c5f1efe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.