I'll try to be more clear on the issue. We have 8 tags/groups per environment (staging/production) in different vpcs that need services provisioned and updated in EC2:
webservers databases dashboards etc... Since you can not use a variable from /etc/ansible in the 'hosts:' setting in a playbook, we can either - use different group names for each environment (and hence need different plays per) - ideally, use the same tag_Name setting across environments and rely on the ec2.py/ini combo to filter for the right instances based on vpc subnet id The second case is preferable, but despite filtering by vpc_id in ec2.py, the 'exact_count' setting in the ec2 module for provisioning looks at the number of instances tagged across vpcs. Does anyone know of a way to make it only consider the instances that pass the instance filters from the dynamic inventory script? On Monday, February 9, 2015 at 11:49:30 PM UTC-5, Gary Malouf wrote: > > We are experimenting with a staging and production environment each in > their own vpc. It has been a struggle to use the EC2 module with this > setup because despite applying instance filters to ec2. ini, the 'count' > tags used in the ec2 module for provisioning count instances across vpcs if > they have the same tag. Ths instance filters are using vpc ids, I can see > this works when running a simple list of instances but the exact count > setting in the EC2 module counts instances with tags across vpcs anyways. > -- 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/9d6fbc44-1942-4a08-8773-7d16a7feda5d%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
