Am 27.03.16 schrieb Jatin Ganhotra:
> 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