Can't disable Ansible's host key checking

前端 未结 2 866
暗喜
暗喜 2021-02-02 13:39

I\'m using Ansible 1.5.4 to provision my Vagrant 1.4.3 box on Ubuntu 14.04 LTS.

I\'m getting the following error message in verbose mode:

2条回答
  •  滥情空心
    2021-02-02 14:33

    You'll need to set it via the Vagrantfile of the project. When the Vagrant Ansible provisioner makes the call to ansible-playbook it always sets the value of the ANSIBLE_HOST_KEY_CHECKING environment variable.

    Ansible itself takes the value of the environment variable if present. Therefore Vagrant will override the value used in your ansible.cfg.

    Therefore you just need something like:

    machine.vm.provision :ansible do |ansible|
      ansible.host_key_checking = false
      # etc.
    end
    

提交回复
热议问题