Sha256: 1f7c27bf5a965acdc6060a728e7e11c5b4a3ef4eb898c715ceeea5d9dd9e7839
Contents?: true
Size: 556 Bytes
Versions: 13
Compression:
Stored size: 556 Bytes
Contents
require 'ipaddress' module ForemanAnsible # Ensures Ansible reports from hosts where the IP was used, are assigned # to the right hostname in Foreman module AnsibleReportImporter extend ActiveSupport::Concern included do def host hostname = name.downcase if AnsibleReportScanner.ansible_report?(raw['logs']) && IPAddress.valid?(hostname) && Nic::Interface.find_by(:ip => hostname) @host = Nic::Interface.find_by(:ip => hostname).host end super end end end end
Version data entries
13 entries across 13 versions & 1 rubygems