Hi all.
As a beginner, one of the first playbooks I am developing is to copy a file from a network drive to the windows host.
---
- name: Copying a file to Windows host
gather_facts: no
hosts: win
tasks:
- name: Copy TU.exe file
win_copy:
src: 'Z:\TU\TestUniverseLabel.png'
remote_src: yes
dest: 'C:\TU\TestUniverseLabel.png'
The error returning is this:
[warken1@ansible-controller windows-projects]$ ansible-playbook -i inventory file_TU_copy.yml
PLAY [Copying a file to Windows host] ********************************************************************************************
TASK [Copy TU.exe file] **********************************************************************************************************
fatal: [win-node1]: FAILED! => {"changed": false, "dest": "C:\\TU\\TestUniverseLabel.png", "msg": "Cannot copy src file: 'Z:\\TU\\TestUniverseLabel.png' as it does not exist", "src": "Z:\\TU\\TestUniverseLabel.png"}
PLAY RECAP ***********************************************************************************************************************
win-node1 : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
Some details about the "infrastructure" behind this :) Both ansible and windows hosts are VMs available in a VMware Workstation. I shared a host folder (this is the network drive), so the windows VM has access to it. I can copy, move, delete, etc files from inside the windows VM. Not sure if that is something to consider thou related to the ansible VM...
Any light over my brain is really appreciated for my next steps.