Ansible + AWS documentation

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

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

thanks, it worked as suggested,

now I am trying create an inventory file for production and staging as suggested here in suggested here in article Static Groups of Dynamic Groups

production

[webservers]

“tag_environment_staging:&tag_stack_webserver”

staging

[webservers]

“tag_environment_production:&tag_stack_webserver”

but I am receiving error