Class: ForemanDiscovery::HostFactImporter

Inherits:
HostFactImporter
  • Object
show all
Defined in:
app/services/foreman_discovery/host_fact_importer.rb

Instance Method Summary collapse

Instance Method Details

#import_facts(facts) ⇒ Object



2
3
4
5
6
7
8
9
# File 'app/services/foreman_discovery/host_fact_importer.rb', line 2

def import_facts(facts)
    # Discovered Hosts won't report in via puppet, so we can use that field to
    # record the last time it sent facts...
    host.last_report = Time.now
    # Set the correct facts type for new foreman facts importing code.
    facts[:_type] = :foreman_discovery
    super(facts)
end