ERROR! Specified hosts options do not match any hosts

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)-

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

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
  sudo: yes
  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