diff options
Diffstat (limited to 'inventory')
-rwxr-xr-x | inventory/libvirt/hosts/libvirt_generic.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/inventory/libvirt/hosts/libvirt_generic.py b/inventory/libvirt/hosts/libvirt_generic.py index 0a98e2af3..4652f112e 100755 --- a/inventory/libvirt/hosts/libvirt_generic.py +++ b/inventory/libvirt/hosts/libvirt_generic.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 """ libvirt external inventory script @@ -131,7 +131,7 @@ class LibvirtInventory(object): root = ET.fromstring(domain.XMLDesc()) ns = {'ansible': 'https://github.com/ansible/ansible'} - for tag_elem in root.findall('./metadata/ansible:tag', ns): + for tag_elem in root.findall('./metadata/ansible:tags/ansible:tag', ns): tag = tag_elem.text self.push(inventory, "tag_%s" % tag, domain_name) self.push(hostvars, 'libvirt_tags', tag) |