Skip to content

Commit

Permalink
enc.rb: Switch from legacy to structured facts
Browse files Browse the repository at this point in the history
networking.fqdn is the successor. Manual verification:

```
irb(main):001:0> require 'facter'
=> true
irb(main):002:0> puts Facter.value('networking.fqdn')
puppet.local
=> nil
irb(main):003:0>
```
  • Loading branch information
bastelfreak committed Dec 16, 2024
1 parent 2f6c193 commit 021178e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion files/enc.rb
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ def build_body(certname,filename)

begin
require 'facter'
puppet_facts['values']['puppetmaster_fqdn'] = Facter.value(:fqdn).to_s
puppet_facts['values']['puppetmaster_fqdn'] = Facter.value('networking.fqdn').to_s
rescue LoadError
puppet_facts['values']['puppetmaster_fqdn'] = `hostname -f`.strip
end
Expand Down

0 comments on commit 021178e

Please sign in to comment.