Minor fix to ipv6 detection for inventory with -i

For link-local addresses, it is sometimes necessary to append the
interface to use for the ipv6 address. This patch extends the ipv6
regex to allow for '%ifnameX' at the end.

See https://bugzilla.redhat.com/show_bug.cgi?id=136852 for more info
pull/3583/merge
James Cammarata 11 years ago
parent b655d5798b
commit 39628d012d

@ -74,7 +74,7 @@ class Inventory(object):
self.parser = None self.parser = None
all = Group('all') all = Group('all')
self.groups = [ all ] self.groups = [ all ]
ipv6_re = re.compile('\[([a-f:A-F0-9]*)\](?::(\d+))?') ipv6_re = re.compile('\[([a-f:A-F0-9]*[%[0-z]+]?)\](?::(\d+))?')
for x in host_list: for x in host_list:
m = ipv6_re.match(x) m = ipv6_re.match(x)
if m: if m:

Loading…
Cancel
Save