Ansible 复制与同步 [英] Ansible Copy vs Synchronize

查看:23
本文介绍了Ansible 复制与同步的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用 Ansible Synchronize 与 Copy 模块的优缺点是什么.据我所知,同步具有复制的所有功能,但速度可能要快得多,所以我正在考虑更改所有内容以使用同步.同步的唯一缺点是需要 rsync,这在 Linux 环境中似乎相当普遍.

What are the pros and cons to using Ansible Synchronize vs Copy modules. As far as I can tell synchronize has all the functionality that copy does but may be much faster so I'm considering changing everything to use synchronize. The only downside of synchronize is that rsync is required, which seems fairly ubiquitous in the Linux environment.

推荐答案

区别与传统的 rsyncscp 非常相似.Rsync 具有更多功能并且通常速度更快,但是设置起来有点棘手,并且需要转动更多旋钮.

The differences are pretty similar to traditional rsync vs scp. Rsync has more features and is often faster, however it's a little bit trickier to setup and has more knobs to turn.

此外,https://docs.ansible.com/ansible/copy_module.html 状态:

复制"模块递归复制工具不会扩展到大量(>数百个)文件.作为替代方案,请参阅同步模块,它是 rsync 的包装器.

The "copy" module recursively copy facility does not scale to lots (>hundreds) of files. For alternative, see synchronize module, which is a wrapper around rsync.

这篇关于Ansible 复制与同步的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆