How to set host_key_checking=false in ansible inventory file?

前端 未结 6 540
清歌不尽
清歌不尽 2020-12-12 12:10

I would like to use ansible-playbook command instead of \'vagrant provision\'. However setting host_key_checking=false in the ho

6条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-12 13:01

    You set these configs either in the /etc/ansible/ansible.cfg or ~/.ansible.cfg or ansible.cfg(in your current directory) file

    [ssh_connection]
    ssh_args = -C -o ControlMaster=auto -o ControlPersist=60s -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no
    

    tested with ansible 2.9.6 in ubuntu 20.04

提交回复
热议问题