Project

General

Profile

« Previous | Next » 

Revision 4e68ddfe

Added by Julian Todt almost 6 years ago

Fixes #23626 - Move autosign to build queue

View differences:

app/models/host/managed.rb
(puppetmaster == "puppet") ? "puppet.#{domain.name}" : puppetmaster.to_s
end
# Cleans Certificate and enable Autosign
# Called before a host is given their provisioning template
# Returns : Boolean status of the operation
def handle_ca
# If there's no puppetca, tell the caller that everything is ok
return true unless Setting[:manage_puppetca]
return true unless puppetca?
# From here out, we expect things to work and return true
return false unless respond_to?(:initialize_puppetca, true)
return false unless initialize_puppetca
return false unless delCertificate
# If use_uuid_for_certificates is true, reuse the certname UUID value.
# If false, then reset the certname if it does not match the hostname.
if (Setting[:use_uuid_for_certificates] ? !Foreman.is_uuid?(certname) : certname != hostname)
logger.info "Removing certificate value #{certname} for host #{name}"
self.certname = nil
end
setAutosign
end
def import_facts(facts, source_proxy = nil)
# Facts come from 'existing' attributes/infrastructure. We skip triggering
# the orchestration of this infrastructure when we create a host this way.

Also available in: Unified diff