Problem:
good afternoon. I’m trying to add a fact to the foreman server in /etc/puppetlabs/code/modules/lib/name.rb with the following contents
# hardware_platform.rb
Facter.add("h_platform") do
setcode do
Facter::Util::Resolution.exec('/bin/uname -i')
end
end
after that, I run /opt/puppetlabs/puppet/bin/puppet agent -t on the client there are no errors, but when executing /opt/puppetlabs/puppet/bin/facter -p | grep h_platform, the output is empty, which indicates the absence of this fact. Please tell me what I’m missing?
Expected outcome:
Foreman and Proxy versions:
foreman 3.4
Foreman and Proxy plugin versions:
puppet7
Distribution and version:
Other relevant data: