From 04618b9a600ca2cb02f466d7e27a931c8812ecc2 Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Mon, 16 Dec 2024 19:05:42 +0100 Subject: [PATCH 1/2] enc.rb: Replace fqdn->networking.fqdn fact Followup for https://github.com/theforeman/puppet-puppetserver_foreman/pull/53#pullrequestreview-2506868914 --- files/enc.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/enc.rb b/files/enc.rb index 4b16178..aa0be7e 100644 --- a/files/enc.rb +++ b/files/enc.rb @@ -185,7 +185,7 @@ def quote_macs! facts def build_body(certname,filename) puppet_facts = parse_file(filename, true) - hostname = puppet_facts['values']['fqdn'] || certname + hostname = puppet_facts['values']['networking']['fqdn'] || certname # if there is no environment in facts # get it from node file ({puppetdir}/yaml/node/ From 422bc903011b527d3bbf0babb31e35342ccbe34a Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Mon, 16 Dec 2024 19:20:29 +0100 Subject: [PATCH 2/2] Update files/enc.rb Co-authored-by: Ewoud Kohl van Wijngaarden --- files/enc.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/enc.rb b/files/enc.rb index aa0be7e..1959de3 100644 --- a/files/enc.rb +++ b/files/enc.rb @@ -185,7 +185,7 @@ def quote_macs! facts def build_body(certname,filename) puppet_facts = parse_file(filename, true) - hostname = puppet_facts['values']['networking']['fqdn'] || certname + hostname = puppet_facts.dig('values', 'networking', 'fqdn') || certname # if there is no environment in facts # get it from node file ({puppetdir}/yaml/node/