summaryrefslogtreecommitdiffstats
path: root/lib/facter/util/ip.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/facter/util/ip.rb')
-rw-r--r--lib/facter/util/ip.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/facter/util/ip.rb b/lib/facter/util/ip.rb
index fb32d70..9fb7034 100644
--- a/lib/facter/util/ip.rb
+++ b/lib/facter/util/ip.rb
@@ -51,7 +51,7 @@ module Facter::Util::IP
# at the end of interfaces. So, we have to trim those trailing
# characters. I tried making the regex better but supporting all
# platforms with a single regex is probably a bit too much.
- output.scan(/^\w+[.:]?\d+[.:]?\d*[.:]?\w*/).collect { |i| i.sub(/:$/, '') }
+ output.scan(/^\w+[.:]?\d+[.:]?\d*[.:]?\w*/).collect { |i| i.sub(/:$/, '') }.uniq
end
def self.get_all_interface_output