[ssh_connection]
# ssh arguments to use
# Leaving off ControlPersist will result in poor performance, so use
# paramiko on older platforms rather than removing it
# 设置下面一行来避免没有接受远程主机指纹使得连接失败 http://www.361way.com/ansible-cfg/4401.html
# 下面一行在服务器重装系统之后会发生连接不上的情况,推荐使用defaults 里面host_key_checking = False
# ssh_args = -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no'
[defaults]
timeout = 10
# 不校验ssh key, 因为服务器重装系统之后就再也连不上了
host_key_checking = False
log_path = ./ansible.log
网友评论