Problem:
We use Chef to provision our servers, and I have installed the chef_handler_foreman gem to upload system facts to Foreman. The Chef runs succeeds without errors and shows
Running handlers:
- ChefHandlerForeman::ForemanFacts
- ChefHandlerForeman::ForemanFacts
Running handlers complete
But the facts don’t seem to be recognized in Foreman. In particular, our hosts that have been upgraded from Alma Linux 8.5 to 8.6 still appear in Foreman with an operating system of Alma Linux 8.5. I can update the information in Foreman by unregistering and re-registering the hosts, but I was under the impression that that shouldn’t be necessary if we’re uploading system facts.
Expected outcome:
Operating system version shown in Foreman matches what is installed on the hosts.
Foreman and Proxy versions:
Foreman 3.1.3
Foreman and Proxy plugin versions:
Katello 4.3.1
chef_handler_foreman 0.2.1
Distribution and version:
CentOS 7.9
Other relevant data:
/etc/chef/client.rb:
chef_server_url "https://manage.chef.io/organizations/<org>"
foreman_enc true
foreman_facts_cache_file "/var/cache/chef_foreman_cache.md5"
foreman_facts_upload true
foreman_facts_whitelist ["os_release", "lsb", "network", "cpu"]
foreman_reports_upload true
foreman_server_url "https://foreman.server.url"
log_location "/var/log/chef/client.log"
reports_log_level "notice"
require "chef_handler_foreman"
validation_client_name "<validator>"
verify_api_cert true
node_name "<hostname>"
ohai.disabled_plugins = [:Sessions]
file_backup_path "/var/lib/chef"
run_path "/var/run/chef"