markt-de / puppet-acme

Centralized SSL certificate management using acme.sh and the ACME protocol
https://forge.puppet.com/markt/acme
Apache License 2.0
9 stars 17 forks source link

1.0.3 breaks puppet 5 support #17

Closed oxc closed 4 years ago

oxc commented 4 years ago

When updating to 1.0.3 on puppet 5.5, I get the following error:

Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: Unknown function: 'get'. (file: /etc/puppetlabs/code/environments/p roduction/modules/acme/manifests/request/crt.pp, line: 24, column: 33) (file: /etc/puppetlabs/code/environments/production/modules/acme/manifests/init.pp, line: 106) on node mynode

I believe this is caused by changeset 59144d61e522fdebceea58310dc76e1ffa02a3d6, which introduces usage of the $facts.get() function, which is not available before Puppet 6.0.

It would probably be better to use the fact() function from stdlib. Since the fact names don't use dot navigation, a simple $facts["..."] lookup might do as well.