title: no hosts matched : vagrant with ansible
body: <p>For test purposes I've configured a combination of vagrant/virtualbox/ansible.</p>
  
  <p>Versions >>  Ansible : 2.3.1.0 | Vagrant : 1.9.5.</p>
  
  <p>While running :</p>
  
  <pre><code>vagrant provision
  </code></pre>
  
  <p>the output states :</p>
  
  <pre><code>  web1: Running provisioner: ansible...
    web1: Running ansible-playbook...
    PLAY [Install Apache] 
    **********************************************************
     skipping: no hosts matched
     PLAY RECAP 
    ****************************************************************
  </code></pre>
  
  <p>Below the configuration files :</p>
  
  <p>Vagrantfile:</p>
  
  <pre><code>Vagrant.configure("2") do |config|
    config.vm.box = "centos/7"
    config.vm.define "web1"
    config.vm.network "private_network", type: "dhcp"
    config.vm.network "forwarded_port", guest: 8040, host: 8090
    config.vm.provider "virtualbox" do |vb|
      vb.memory = "256"
    config.vm.provision "ansible" do |ansible|
      ansible.playbook = "provisioning/playbook.yml"
    end
    end
    end
  </code></pre>
  
  <p>Playbook :</p>
  
  <pre><code>  ---
    - name: Install Apache
      hosts: testclients
      become_user: root
      roles:
        - apache
  </code></pre>
  
  <p>Andible inventory (/etc/ansible/hosts) :</p>
  
  <pre><code> [testclients]
   testclient3
  </code></pre>
  
  <p>and successful checking</p>
  
  <pre><code>  ansible -m ping testclients
    testclient3 | SUCCESS =&gt; {
    "changed": false,
    "ping": "pong"
      }
  </code></pre>
  
  <p>The weird thing is that if i will run the playbook itself (ansible-playbook playbook.yml) it works, in contrary inside vagrant which doesn't and return "no hosts matched".
  Any help would be appreciated.</p>