diff --git a/files/enc.rb b/files/enc.rb index 4b16178..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']['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/