操作系统:Wk16 与 Debian 10.4 Ansible:2.9
大家好
我需要从远程 Windows 向远程 linux 发送文件,无需在本地复制,无需在 Windows 服务器中安装 ssh 包。
A Win_server <-- Ansible role executor -- B Ansible_host C linux_host
|
| ^
|___SENDING FILE_______________________________________TO___________|
非常感谢
答案 0 :(得分:0)
在 Ansible 文档中签出同步模块:https://docs.ansible.com/ansible/latest/collections/ansible/posix/synchronize_module.html
另外,注意在目标之间建立直接的 ssh 连接。
提示:可以在 windows 上激活 ssh 并建立与 linux 机器的连接。注意风险!
另一种方法是使用 fetch 和 copy 来做三角形复制,使用 Ansible 服务器作为肘部。
答案 1 :(得分:0)
今天我如@guistela 所说的那样将 SSH 放在 Windows 中。
我使用 ansible 在 Windows 主机上安装了“Posh-SSH”:
这 4 个通用步骤允许将文件从 windows 发送到 linux 主机。
诚挚的