Skip to content

Commit

Permalink
Merge pull request puppetlabs#9468 from joshcooper/hardcode_hostname_…
Browse files Browse the repository at this point in the history
…domain

Hardcode hostname and domain
  • Loading branch information
cthorn42 authored Sep 3, 2024
2 parents 4dc39df + 1a9544e commit b7f89c4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 4 additions & 0 deletions lib/puppet/reference/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@
val = '$confdir/hiera.yaml. However, for backwards compatibility, if a file exists at $codedir/hiera.yaml, Puppet uses that instead.'
when 'certname'
val = "the Host's fully qualified domain name, as determined by Facter"
when 'hostname'
val = "(the system's fully qualified hostname)"
when 'domain'
val = "(the system's own domain)"
when 'srv_domain'
val = 'example.com'
when 'http_user_agent'
Expand Down
4 changes: 2 additions & 2 deletions lib/puppet/settings.rb
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,11 @@ def self.default_certname
end

def self.hostname_fact
ENV['PUPPET_REFERENCES_HOSTNAME'] || Puppet.runtime[:facter].value('networking.hostname')
Puppet.runtime[:facter].value('networking.hostname')
end

def self.domain_fact
ENV['PUPPET_REFERENCES_DOMAIN'] || Puppet.runtime[:facter].value('networking.domain')
Puppet.runtime[:facter].value('networking.domain')
end

def self.default_config_file_name
Expand Down
3 changes: 0 additions & 3 deletions rakelib/generate_references.rake
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,6 @@ end
namespace :references do
desc "Generate configuration reference"
task :configuration do
ENV['PUPPET_REFERENCES_HOSTNAME'] = "(the system's fully qualified hostname)"
ENV['PUPPET_REFERENCES_DOMAIN'] = "(the system's own domain)"

body = puppet_doc('configuration')
generate_reference('configuration', CONFIGURATION_ERB, body, CONFIGURATION_MD)
end
Expand Down

0 comments on commit b7f89c4

Please sign in to comment.