I’m a newbie in Ansible and I’d like to use the aws_ec2 plugin to return a list of ec2 instances with 2 tags: env=stage and a=(empty). I’m using “filters” with “tag” like the followings:
filters:
tag:Env:
- stage
tag:a:
-
Besides leaving a blank, I’ve also tried “”, ‘’, None, _, null, ~, but they all failed to return the list. I’ve also tried using the “tag-key” “filter” but no luck:
filters:
tag-key:
- a
Can someone please help? Also, would you also use filters?
Thanks.