首页 > 其他 > 详细

让你的ansible飞起来

时间:2018-03-26 18:47:29      阅读:342      评论:0      收藏:0      [点我收藏+]

一、SSH Multiplexing

1 配置

vim /etc/ssh/ssh_config

Host * GSSAPIAuthentication yes # If this option is set to yes then remote X11 clients will have full access # to the original X11 display. As virtually no X11 client supports the untrusted # mode correctly we set this to yes. ForwardX11Trusted yes # Send locale-related environment variables SendEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES SendEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT SendEnv LC_IDENTIFICATION LC_ALL LANGUAGE SendEnv XMODIFIERS ControlMaster yes # 这个是新增的 ControlPath /tmp/%r@%h:%p # 这个是新增的 ControlPersist 10m # 这个是新增的

 

2 测试

[root@host-172-20-6-120 playbooks]# ssh -O check 172.20.6.121
root@172.20.6.121‘s password: 
Master running (pid=16802)    # 有这个说明开启成功

上面的不是”零“ 而是大写的0

  

测试速度

[root@host-172-20-6-120 playbooks]# time ssh 172.20.6.121 /bin/true
root@172.20.6.121‘s password: 
ControlSocket /tmp/root@172.20.6.121:22 already exists, disabling multiplexing

real	0m2.137s
user	0m0.032s
sys	0m0.005s

  

二、启用pipelining

# 启用pipelining 的ansible.cfg

[defaults]
pipelining = True

  

 

让你的ansible飞起来

原文:https://www.cnblogs.com/wanstack/p/8652520.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!