puppet版本:3.6.1
puppetmaster上执行facter的时候,总是有提示:
Could not retrieve fact='arp_eth0', resolution='<anonymous>': undefined method `get_arp_value' for Facter::Util::IP:Module
解决办法:vim /usr/lib/ruby/site_ruby/1.8/facter/util/ip.rb
#加入以下内容:
def self.get_arp_value(interface)
arp = Facter::Util::Resolution.exec("arp -en -i #{interface} | sed -e 1d")
if arp =~ /^\S+\s+\w+\s+(\S+)\s+\w\s+\S+$/
return $1
end
end
重启puppetmaster.再次执行facter,问题解决!
本文转自 zhangzj1030 51CTO博客,原文链接:http://blog.51cto.com/tech110/1424713