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,問題解決!