Skip to content

Commit b7f89c4

Browse files
authoredSep 3, 2024··
Merge pull request #9468 from joshcooper/hardcode_hostname_domain
Hardcode hostname and domain
2 parents 4dc39df + 1a9544e commit b7f89c4

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed
 

Diff for: ‎lib/puppet/reference/configuration.rb

+4
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@
4141
val = '$confdir/hiera.yaml. However, for backwards compatibility, if a file exists at $codedir/hiera.yaml, Puppet uses that instead.'
4242
when 'certname'
4343
val = "the Host's fully qualified domain name, as determined by Facter"
44+
when 'hostname'
45+
val = "(the system's fully qualified hostname)"
46+
when 'domain'
47+
val = "(the system's own domain)"
4448
when 'srv_domain'
4549
val = 'example.com'
4650
when 'http_user_agent'

Diff for: ‎lib/puppet/settings.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,11 @@ def self.default_certname
8181
end
8282

8383
def self.hostname_fact
84-
ENV['PUPPET_REFERENCES_HOSTNAME'] || Puppet.runtime[:facter].value('networking.hostname')
84+
Puppet.runtime[:facter].value('networking.hostname')
8585
end
8686

8787
def self.domain_fact
88-
ENV['PUPPET_REFERENCES_DOMAIN'] || Puppet.runtime[:facter].value('networking.domain')
88+
Puppet.runtime[:facter].value('networking.domain')
8989
end
9090

9191
def self.default_config_file_name

Diff for: ‎rakelib/generate_references.rake

-3
Original file line numberDiff line numberDiff line change
@@ -180,9 +180,6 @@ end
180180
namespace :references do
181181
desc "Generate configuration reference"
182182
task :configuration do
183-
ENV['PUPPET_REFERENCES_HOSTNAME'] = "(the system's fully qualified hostname)"
184-
ENV['PUPPET_REFERENCES_DOMAIN'] = "(the system's own domain)"
185-
186183
body = puppet_doc('configuration')
187184
generate_reference('configuration', CONFIGURATION_ERB, body, CONFIGURATION_MD)
188185
end

0 commit comments

Comments
 (0)
Please sign in to comment.