# ERROR! Specified hosts options do not match any hosts

**URL:** <https://forum.ansible.com/t/error-specified-hosts-options-do-not-match-any-hosts/20994>\
**Category:** Ansible Project\
**Created:** [March 27, 2016, 5:19am UTC](https://forum.ansible.com/t/error-specified-hosts-options-do-not-match-any-hosts/20994 "2016-03-27T05:19:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jatin\_Ganhotra](https://avatars.discourse-cdn.com/v4/letter/j/f05b48/32.png) [@Jatin\_Ganhotra](https://forum.ansible.com/u/Jatin_Ganhotra)\
**Post date:** [March 27, 2016, 5:19am UTC](https://forum.ansible.com/t/error-specified-hosts-options-do-not-match-any-hosts/20994/1 "2016-03-27T05:19:11Z")

</div>

Hi,

This is my first take at Ansible and I can’t figure out what I am doing wrong. I have 1 vagrant VM host with a static private IP provided for testing purposes on my personal Mac.

› ansible --version  
ansible 2.0.1.0  
config file =  
configured module search path = Default w/o overrides

My .yml file looks like this ( borrowed & modified from an Ansible example playbook)-

---

<div class="post-metadata">

**Author:** ![rup](https://avatars.discourse-cdn.com/v4/letter/r/71c47a/32.png) [@rup](https://forum.ansible.com/u/rup)\
**Post date:** [March 28, 2016, 8:28pm UTC](https://forum.ansible.com/t/error-specified-hosts-options-do-not-match-any-hosts/20994/2 "2016-03-28T20:28:06Z")

</div>

How are you running your playbook? I.e. what is your command?

---

<div class="post-metadata">

**Author:** ![Johannes\_Kastl](https://avatars.discourse-cdn.com/v4/letter/j/bbe5ce/32.png) [@Johannes\_Kastl](https://forum.ansible.com/u/Johannes_Kastl)\
**Post date:** [March 29, 2016, 7:58am UTC](https://forum.ansible.com/t/error-specified-hosts-options-do-not-match-any-hosts/20994/3 "2016-03-29T07:58:34Z")

</div>

> This is my first take at Ansible and I can't figure out what I am doing  
> wrong. I have 1 vagrant VM host with a static private IP provided for  
> testing purposes on my personal Mac.

You mean you have a mac as controller host and a VM provided by  
Vagrant as the target you want to apply your configuration on?

> My .yml file looks like this ( borrowed & modified from an Ansible example  
> playbook)-  
> ---  
> - hosts: all  
> &nbsp;&nbsp;sudo: yes  
> &nbsp;&nbsp;gather\_facts: no

You have no tasks defined in your playbook.

> › cat /etc/ansible/hosts  
> [postgresVMserver]  
> 192.168.33.10

> When I run the playbook, I get  
> › ansible-playbook postgresql.yml  
> [WARNING]: provided hosts list is empty, only localhost is available

Is postgresql.yml the playbook you cited above?

> When I run the following command to list all the hosts, I get -  
> › ansible -i hosts --list-hosts all  
> ERROR! Specified hosts options do not match any hosts

What happens when you enter the following commands in a shell:

ansible -m setup all

Maybe add a "-vv" before the -m to see errors better.

Regards,  
Johannes
