目前,它要求输入是或否,我想忽略或传入程序本身,
TASK [Gathering Facts] ************************************************************************************************************************
The authenticity of host '192.168.112.188 (192.168.112.188)' can't be established.
ECDSA key fingerprint is SHA256:UoKxAB0x6sxQCggsklebbnxhdadajdjvsbbb5w.
Are you sure you want to continue connecting (yes/no)?
如果你想看到ansible的代码可以参考问题,
' NoneType'对象没有属性' upper'使用ansible-python模块运行playbook?
答案 0 :(得分:2)
您应该更改StrictHostKeyChecking
ssh客户端选项。
有多种方法可以实现这一目标。例如,在ansible.cfg
:
[ssh_connection]
ssh_args = -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no