DEV Community

Roy
Roy

Posted on

1 2

vagrant will not run an ansible play if the vm do not match the hosts line in the play

---
- hosts: localhost
  connection: local
  tasks:
    - debug: msg="Please work, Vagrant!"

I use a playbook with content as above in vagrant provision, but when run vagrant, it says

skipping: no hosts matched

so it is run ansible-playbook -i <vm-host-name>, playbook.yml, if the target do not match hosts: in the play, the play will be skipped

Top comments (0)

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay