# Filter in dynamic inventory

**URL:** <https://forum.ansible.com/t/filter-in-dynamic-inventory/33482>\
**Category:** Ansible Project\
**Tags:** windows\
**Created:** [July 24, 2020, 11:20am UTC](https://forum.ansible.com/t/filter-in-dynamic-inventory/33482 "2020-07-24T11:20:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rafael\_Tomelin](https://avatars.discourse-cdn.com/v4/letter/r/da6949/32.png) [@Rafael\_Tomelin](https://forum.ansible.com/u/Rafael_Tomelin)\
**Post date:** [July 24, 2020, 11:20am UTC](https://forum.ansible.com/t/filter-in-dynamic-inventory/33482/1 "2020-07-24T11:20:07Z")

</div>

Hi guys,

I use dynamic inventory azure\_rm and I have a problem with exluce\_host\_filters.

Some vms starts with xyz… and has tags. I need to filter the VMs starts with xyz but not has tags firewall and not working.

exclude\_host\_filters:

- location not in [‘eastus2’]
- “‘xyz’ not in name”
- “‘firewall’ in tags.product”

Other question,  
Is possible create inventory children in dynamic inventory, example?

conditional\_groups:  
vms:

- dev: “name.startswith(‘xyz\_dev’)”
- win: “‘windows’ in os\_disk.operating\_system\_type”
- lnx: os\_disk.operating\_system\_type == ‘linux’
