# Ansible on Vagrant - skipping: no hosts matched

DevFeed: [Ansible on Vagrant - skipping: no hosts matched](<https://devfeed.tech/articles/ansible-on-vagrant-skipping-no-hosts-matched-27624.md>)

Original publisher: [Read original article](<https://gagor.pro/2015/12/ansible-on-vagrant-skipping-no-hosts-matched/>)

Author: Tom

Published: 2015-12-29T00:00:00Z

Content type: tutorial

Language: en

Sources: [Tomasz Gągor](<https://devfeed.tech/sources/tomasz-gagor.md>)

Topics: [Ansible](<https://devfeed.tech/topics/ansible.md>), [Vagrant](<https://devfeed.tech/topics/vagrant.md>), [Ansible Roles](<https://devfeed.tech/topics/ansible-role.md>), [Testing](<https://devfeed.tech/topics/testing.md>), [Raspberry Pi](<https://devfeed.tech/topics/raspberry-pi.md>)

Tags: [ansible](<https://devfeed.tech/tags/ansible.md>), [linux](<https://devfeed.tech/tags/linux.md>), [raspberry-pi](<https://devfeed.tech/tags/raspberry-pi.md>), [test](<https://devfeed.tech/tags/test.md>), [testing](<https://devfeed.tech/tags/testing.md>), [tools](<https://devfeed.tech/tags/tools.md>), [vagrant](<https://devfeed.tech/tags/vagrant.md>)

## AI overview

This tutorial explains how to resolve Ansible's "no hosts matched" problem when testing playbooks with Vagrant. The issue occurs because the testing machine is not included in the host group defined by the playbook; adding the Vagrant machine to that group in the Vagrantfile resolves it.

## Source excerpt

I have some Ansible roles to configure my vps, Raspberry Pi, etc. I like to test them before I broke something on my real, not clustered machines - I use Vagrant for that. But with it I had one problem - in playbooks I define hosts as groups of severs ex. web for my vps: Example Ansible playbook - hosts: web gather_facts: True sudo: True ... But testing machine wasn't in this group and when I run vagrant I could only see: