“skipping: no hosts matched” issue with Vagrant and Ansible

前端 未结 9 1155

I have installed Vagrant, VirtualBox and Ansible and trying to run provision over one host but it always returns \"skipping: no hosts matched\"

The head of my playbook f

9条回答
  •  一向
    一向 (楼主)
    2021-02-05 03:16

    According to the vagrant documentation (http://docs.vagrantup.com/v2/provisioning/ansible.html), when you use Ansible to provision, vagrant will automatically create an host file named vagrant_ansible_inventory_default which will use vagrant vm.config information (like your VM IP, remote ssh port).

    So just add your playbook path using the ansible.playbook = "playbook.yml"

提交回复
热议问题