D
D
DEMonBond2018-11-26 20:51:35
Ansible
DEMonBond, 2018-11-26 20:51:35

Ansible. Copy folder from remote windows machine?

Hello! I need to collect data from remote Windows machines to the server, tell me what I'm doing wrong?
Is this a problem because I'm trying to work with Windows?
---
- name: Copy server file version control
synchronize:
src: '/TEMP'
dest: 'D:/ansibleMQ/version_control'
mode: pull
when: "((ansible_os_family == 'Windows'))"
fatal: [host .IRUS.ESB.GW1]: FAILED! => {"changed": false, "msg": "synchronize uses rsync to function. rsync needs to connect to the remote host via ssh, docker client or a direct filesystem copy. This remote host is being accessed via winrm instead so it cannot work."}
fatal: [host.IRUS.ESB.GW2]: FAILED! => {"changed": false, "msg": "synchronize uses rsync to function. rsync needs to connect to the remote host via ssh, docker client or a direct filesystem copy. This remote host is being accessed via winrm instead so it cannot work."}

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry Shitskov, 2018-11-27
@DEMonBond

Try using fetch
https://docs.ansible.com/ansible/2.5/modules/fetch...

P
Puma Thailand, 2018-11-27
@opium

Go to Windows via ssh

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question