Hi all, I'm managing some Ubuntu EC2 servers with Ansible - they primarily run applications that get deployed with Capistrano, via the cap-ec2 plugin (https://github.com/forward3d/cap-ec2). cap-ec2 looks for a "Roles" tag, featuring a comma-separated list of server roles (app, db, web, worker, etc). In the setup we're using, one EC2 server can fill multiple roles, so it's common to see the Roles tag with commas in it. It also uses a "Stages" tag, with values like "production" and "staging", to indicate environment.
I'd also like to use the ec2.py dynamic inventory script to pull the hosts out of EC2, and run playbooks against our staging app servers, for example. However, it seems like ec2.py doesn't play well with comma-separated tag values (turning them into underscores). So a server that has Roles: app,web, that will get turned into tag_Roles_app_web, but another server that has Roles: app,worker would be tag_Roles_app_worker. So my questions for those wiser in dynamic inventory than I: is there a way that I can aggregate any Role that features "app" into an inventory group, using these existing Roles tags? Do I need to set additional tags like "App: true" so that it would turn into tag_App_true and use those instead? Use a bunch of the :children style tags like below? [app:children] tag_Roles_app_web tag_Roles_app_worker [tag_Roles_app_web] [tag_Roles_app_worker] Any suggestions would be appreciated! Thanks, Wade -- 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/099b8353-08d8-4c0f-9723-704eada7cae1%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
