How to specify No Value for a key in Ansible yaml?

12 views
Skip to first unread message

skwok

unread,
Oct 7, 2020, 3:37:45 PM10/7/20
to Ansible Development
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.
Reply all
Reply to author
Forward
0 new messages