Ensure interface names are downcased
https://tickets.puppetlabs.com/browse/FACT-777 Puppet downcases fact names so they names don't become Types Interfaces can have Uppercase letters in them. Closes-Bug: #1745448 Change-Id: I03fd5c103f4b4d4c90770f4d8aa26ae8eeeecdcd
This commit is contained in:
parent
7687333445
commit
c62bb66667
@ -11,7 +11,8 @@ module Puppet::Parser::Functions
|
||||
ip1 = IPAddr.new(arg[0])
|
||||
Dir.foreach('/sys/class/net/') do |interface|
|
||||
next if interface == '.' || interface == '..'
|
||||
iface_no_dash = interface.gsub('-', '_')
|
||||
# puppet downcases fact names, interface names can have capitals
|
||||
iface_no_dash = interface.gsub('-', '_').downcase
|
||||
|
||||
if ip1.ipv4?
|
||||
ipaddress_name = "ipaddress_#{iface_no_dash}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user