You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am encountering an issue with Puppet where the ${hostname} variable is not resolving correctly in the source path of a file resource. The following manifest snippet is intended to retrieve a certificate file based on the system hostname:
However, this results in a 404 Not Found error, as Puppet is not expanding the ${hostname} variable correctly, leading to it searching for an incorrect file name.
Expected Behavior
expected Puppet to resolve the ${hostname} variable correctly and construct the appropriate source path to retrieve the certificate file.
I have to mention it is a bug in the puppet version : puppet 8.9.0-4
Environment
puppet 8.9.0-4
Platform : linux 6.11.3.arch1-1
Additional Context
Could you please provide a temporary solution to the issue at hand, at least until we can implement a permanent fix? Thank you
The text was updated successfully, but these errors were encountered:
i should mention it seems fact works fine : facter hostname gives me the correct value
i also tried to use fact in my puppet code like this : $::hostname didnt help
i also tried this as puppet says : source => "puppet:///modules/arch/vault-certs/$facts['networking']['hostname'].Cername
still fails with tons of errors
Hi @banafshehft Puppet 8 agents no longer send legacy facts, like hostname, to the server, see https://www.puppet.com/blog/puppet-8 for more details. You'll need to modify your manifest to reference the structured fact. Recommend running puppet-lint to validate your code. Rather than discussing this in the issue tracker, I recommend reaching out in the puppetcommunity slack. Lots of folks there can get you pointed in the right direction.
Describe the Bug
I am encountering an issue with Puppet where the ${hostname} variable is not resolving correctly in the source path of a file resource. The following manifest snippet is intended to retrieve a certificate file based on the system hostname:
However, this results in a 404 Not Found error, as Puppet is not expanding the ${hostname} variable correctly, leading to it searching for an incorrect file name.
Expected Behavior
expected Puppet to resolve the ${hostname} variable correctly and construct the appropriate source path to retrieve the certificate file.
I have to mention it is a bug in the puppet version : puppet 8.9.0-4
Environment
Additional Context
Could you please provide a temporary solution to the issue at hand, at least until we can implement a permanent fix? Thank you
The text was updated successfully, but these errors were encountered: