mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
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
This commit is contained in:
parent
b655d5798b
commit
39628d012d
1 changed files with 1 additions and 1 deletions
|
@ -74,7 +74,7 @@ class Inventory(object):
|
|||
self.parser = None
|
||||
all = Group('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:
|
||||
m = ipv6_re.match(x)
|
||||
if m:
|
||||
|
|
Loading…
Reference in a new issue