0

I am trying to run a molecule test where it is supposed to create a VM and copy a binary from network UNC path to the VM but somehow it is failing with the below mentioned error. This is what the task looks like

- name: Copy mysql_hg binary from network share
  ansible.windows.win_copy:
    src: "\\\\someshare.example.com\\somefolder\\mysql_hg.exe"
    dest: "C:\\Windows\\Temp\\mysql_hg.exe"
    remote_src: True
  vars:
    #ansible_winrm_kerberos_delegation: true
    ansible_become: True
    ansible_become_method: runas
    ansible_become_flags: logon_type=new_credentials logon_flags=netcredentials_only
    ansible_become_user: "someaduser@example.com"
    ansible_become_password: "adpass of someaduser"

<172.16.4.59> ESTABLISH WINRM CONNECTION FOR USER: mol_user on PORT 5986 TO 172.16.4.59
EXEC (via pipeline wrapper)
Using module file /usr/share/ansible/collections/ansible_collections/ansible/windows/plugins/modules/win_copy.ps1
EXEC (via pipeline wrapper)
fatal: [MOL_INST]: FAILED! => {
    "changed": false,
    "dest": "C:\\Windows\\Temp\\mysql_hg.exe",
    "msg": "Cannot copy src file: '\\\\someshare.example.com\\somefolder\\mysql_hg.exe' as it does not exist",
    "src": "\\\\someshare.example.com\\somefolder\\mysql_hg.exe"
}

How to make it work?

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.