After which we created a hostgroup with the appropriate options to use the openscap proxy and we selected the correct puppet classes
We do see an error stating that some classes are unavailable which should not be the case since we selected both the scap client and the stdlib classes.
[root@vslr8sit001 ~] puppet agent -t
Info: Using environment 'testing'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Retrieving locales
Info: Loading facts
Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Resource type not found: Stdlib::Host (file: /usr/share/puppet/modules/foreman_scap_client/manifests/init.pp, line: 99, column: 3) on node vslr8sit001.brain2.com
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
We checked the stdlib module from puppetlabs and the version we have installed is v5.2.0 which should have stdlib::host .
We have found that there was a stdlib version 4.1.0 installed which was not compatible.
When we updated it to version 8.6.0 the issue was solved however now there is a new issue when doing the puppet run when it tries to install the rubygem-foreman_scap_client it fails since it is not able to find the package in the repos.
We have checked the puppet code of the module and see that it should add a Repo which is not the case.
I am wondering will this If statement also matches on a Rocky Linux server or do we need to supply something else for it to add the repo?
This should also work for other EL distributions like Rocky Linux, did you set any value for foreman_repo_rel which enables the repository management? I typically do not use this part as I manage repositories globally/manually.
If you did and it is not working, can you post the resulting repository configuration (should be in /etc/yum.repos.d/foreman-client.repo) and the output from the command dnf -y install rubygem-foreman_scap_client (Puppet is suppressing the standard and error output).
(Host) Parameters are given to Puppet as global variables in the ENC, you need to configure this via Smart Class Parameter (“Configure > Smart Class Parameters”, then selecting “foreman_repo_rel” from the list, check “Override” and set “Default value” from undef to 3.5 and press “Submit”), then it should work.
Try the profile “Standard System Security Profile”, the default one will not work as far as I remember but this one worked in our training. But it will require fetch_remote_resources set to true as it will download the oval data for checking for updates, making it not suitable for every environment.
The other error should be unrelated, but indicates a module not being available in the environment assigned to the host. Mostly this happens because puppet module works with the production environment by default, so other stages get forgotten or simply are not imported into foreman as an refresh afterwards. If you look at Configure > Classes you can see next to the class name which environment it is known to exist by Foreman. If this is not matching your expectation click on the import button above the list. If it is not available to import, check the filesystem.