将文件从几个Windows节点复制到单个Linux主机
我正在尝试将Windows节点(节点A和节点B)的几个文件复制到Linux节点(节点C)。
我的问题是,有一种将文件直接从Windows节点复制到Linux节点的方法,如果是,则如何处理这种情况?
我想到的唯一解决方法是使用一个远程共享文件夹,所有节点都可以访问其中,并使用 win_copy 将Windows节点用于该位置,然后 copy copy copy 让Linux节点选择这些文件。
先感谢您!
I am trying to copy several files from windows nodes (Node A and Node B) into a linux node were ansible is (Node C).
My question is, there is a way to copy files directly from windows nodes to a linux node, if yes, how for this situation?
The only workaround that I have think about is using a remote shared folder, were all the nodes had access to write in it, and use win_copy for windows nodes to that location and after that a copy for the linux node to pick those files.
Thank you in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我只是注意到此任务的正确模块是获取的,它也可以在Windows节点上工作。与复制模块相比,它是反向命令。
https:// https://docs.ansible.com/ansible.com/ansible/latest/ collections/ansible/inceedin/fetch_module.html
I've just notice that the right module for this task is fetch, it also works on Windows Nodes. Its a reverse command compared with copy modules.
https://docs.ansible.com/ansible/latest/collections/ansible/builtin/fetch_module.html