Discussion:
[ansible-project] skipping: no hosts matched
Philipp Krenn
2015-05-06 16:27:04 UTC
Permalink
ansible --version
ansible 1.9.1
configured module search path = None

I've started 2 EC2 instances with Ansible, which is working fine. I can
also see their tag in the cache file:
$ cat ~/.ansible/tmp/ansible-ec2.cache
...
"tag_class_dev_nat": [
"52.28.23.161",
"52.28.92.82"
],
...

Now when I try to run a playbook with "- hosts: tag_class_dev_nat", no
matching hosts can be found:
$ ansible-playbook playbooks/1_nat/1_nat-install.yml -i env/dev/inventory

PLAY [tag_class_dev_nat]
******************************************************
skipping: no hosts matched

PLAY RECAP
********************************************************************


Any ideas why and how to fix this? I'm not even sure how I can debug this...

Thanks a lot,
Philipp
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+***@googlegroups.com.
To post to this group, send email to ansible-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/973d670b-6cce-4003-a61e-2b167088dee6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Dan Vaida
2015-07-21 12:23:57 UTC
Permalink
How old is your cache? Do you also have AWS CLI installed? If so, are the
credentials consistent with the boto credentials/env vars? Any
customizations made to the ec2.ini file? Can you post the playbook? Can you
add *--list-hosts* to your command and post the output here? What about
running *./env/dev/inventory/ec2.py --refresh-cache *(assuming that's where
you have your python script)? It could be something with your inventory
organizing. Can you share the structure?
Post by Philipp Krenn
ansible --version
ansible 1.9.1
configured module search path = None
I've started 2 EC2 instances with Ansible, which is working fine. I can
$ cat ~/.ansible/tmp/ansible-ec2.cache
...
"tag_class_dev_nat": [
"52.28.23.161",
"52.28.92.82"
],
...
Now when I try to run a playbook with "- hosts: tag_class_dev_nat", no
$ ansible-playbook playbooks/1_nat/1_nat-install.yml -i env/dev/inventory
PLAY [tag_class_dev_nat]
******************************************************
skipping: no hosts matched
PLAY RECAP
********************************************************************
Any ideas why and how to fix this? I'm not even sure how I can debug this...
Thanks a lot,
Philipp
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+***@googlegroups.com.
To post to this group, send email to ansible-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/9bd10930-9718-4a25-a0bb-7d839ee46df7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...