Revision ef9f2f9d
Added by Trey Dockendorf over 7 years ago
app/models/host/managed.rb | ||
---|---|---|
end
|
||
|
||
def attributes_to_import_from_facts
|
||
super + [:domain, :architecture, :operatingsystem]
|
||
attrs = [:architecture]
|
||
if !Setting[:ignore_facts_for_operatingsystem] || (Setting[:ignore_facts_for_operatingsystem] && operatingsystem.blank?)
|
||
attrs << :operatingsystem
|
||
end
|
||
if !Setting[:ignore_facts_for_domain] || (Setting[:ignore_facts_for_domain] && domain.blank?)
|
||
attrs << :domain
|
||
end
|
||
|
||
super + attrs
|
||
end
|
||
|
||
def populate_fields_from_facts(facts = self.facts_hash, type = 'puppet')
|
Also available in: Unified diff
Fixes #6006 - Add options to disable updates from facts