Hi,
Is there a space between ":" and "&" ?
Is it is there delete it.
The formula You write is ok:
$ ansible -i /etc/ansible/ec2.py all -m ping --limit
"tag_deployment_production:&tag_role_elasticsearch"
52.XX.XXX.XXX | success >> {
"changed": false,
"ping": "pong"
}
54.XX.XX.XXX | success >> {
"changed": false,
"ping": "pong"
}
and in playbook:
~ $ ansible-playbook -i /etc/ansible/ec2.py /tmp/ping.yml
PLAY [tag_deployment_production:&tag_role_elasticsearch]
**********************
GATHERING FACTS
***************************************************************
ok: [54.XX.XX.XX]
ok: [52.XX.XXX.XXX]
TASK: [TEST PING]
*************************************************************
ok: [54.XX.XX.XX]
ok: [52.XX.XXX.XXX]
PLAY RECAP
********************************************************************
52.XX.XXX.XXX : ok=2 changed=0 unreachable=0
failed=0
~ $ cat /tmp/ping.yml
---
- hosts: "tag_deployment_production:&tag_role_elasticsearch"
tasks:
- name: TEST PING
action: ping
PLASE notice that is available in:
~ $ ansible --version
ansible 1.9.4
configured module search path = /usr/share/ansible
On Thursday, 12 November 2015 00:00:50 UTC+1, I like ansible wrote:
>
> thanks for the documentation about how to manage AWS ec2 dynamic
> inventory, in this example:
>
> http://docs.ansible.com/ansible/intro_dynamic_inventory.html#example-aws-ec2-external-inventory-script
>
> the doc is assuming that two separate accounts are used for dev vs
> production: hence different authentication used to connect.
> another common aws approach is to have one account but multiple VPC (prod
> / staging / dev) and using tags.
>
> would love to have some info written about this second approach one
> account with multiple VPCs
>
> been trying to experiment with stuff like:
>
> hosts: "tag_stack_webserver: &tag_environment_production"
>
> not sure if its the correct approach
>
--
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/3be1578d-8bec-4154-bfc7-8aefb468f524%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.