Ansible副本与同步 [英] Ansible Copy vs Synchronize

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

问题描述

使用Ansible Synchronize vs 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天全站免登陆