Filter in dynamic inventory

14 views
Skip to first unread message

Rafael Tomelin

unread,
Jul 24, 2020, 7:20:36 AM7/24/20
to ansible...@googlegroups.com

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'



--
Atenciosamente,

Rafael Tomelin
Tel.: 51-984104084
Skype: rafael.tomelin

LPI ID: LPI000191271
Red Hat Certified Engineer
Puppet Professional 2017 Certification
Reply all
Reply to author
Forward
0 new messages