ansible synchronize 模块抛出
原创
©著作权归作者所有:来自51CTO博客作者wx62e28ac222a20的原创作品,请联系作者获取转载授权,否则将追究法律责任
1.在使用ansible中使用synchronize模块,抛出错误。
192.168.56.100 | FAILED! => {
"changed": false,
"cmd": "/bin/rsync --delay-updates -F --compress --archive --rsh=/bin/ssh -S none -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null --out-format=<<CHANGED>>%i %n%L 192.168.56.100:/tmp/log/*_linuxHealthCheck_211029.log /home/sysinsp/logs",
"msg": "Warning: Permanently added '192.168.56.100' (ECDSA) to the list of known hosts./r/nbash: rsync: command not found/nrsync: connection unexpectedly closed (0 bytes received so far) [Receiver]/nrsync error: remote command not found (code 127) at io.c(226) [Receiver=3.1.2]/n",
"rc": 127
}
2.原因是因为系统中没有rsync命令,系统还有一些其他命令,索性就一起安装了。
yum install sysstat rsync bc -y
版权声明:本文为博主原创文章,未经博主允许不得转载。
linux