Matching hosts in AWS (or any dynamic inventory?)

11 views
Skip to first unread message

Guy Matz

unread,
Jul 20, 2017, 4:23:34 PM7/20/17
to ansible...@googlegroups.com
Hello!
I would like to match hosts in AWS with something like (passing env as an extravar):
hosts: tag_Function_www:&ec2_tag_Environment=env

I'm currently using this which works:
hosts: "tag_Function_www:&tag_Environment_{{ env|default('test') }}"

but wondering if there's a better way.  Any thoughts would be appreciated


Thanks!
Gu
Reply all
Reply to author
Forward
0 new messages