Description of problem: After provisioning a new host the assigned Ansible roles from hostgroups are not executed on the new host Version-Release number of selected component (if applicable): - Satellite 6.10.1 How reproducible: Steps to Reproduce: 1. Deploy a new host 2. Check if the default ansible roles have been executed on the new host Actual results: - No job is scheduled after the new host finished the build Expected results: - A job to run all assigned Ansible roles should be scheduled Additional info: - by default webhooks plugin was not installed after update to 6.10
Hi, we are requesting a status update. Thanks.
From customer: Ideally we would like to be able to build servers with no manual intervention beyond pressing a button. This makes it so someone has to manually run a Run All Ansible Roles job on a server after it is built. I'm wondering if it might be possible to put in some sort of workaround, possibly using foreman_webhooks.
Hey guys, as this bug is not yet fixed in satellite 6.10.1, you can apply the following fix from upstream: https://projects.theforeman.org/issues/34110 Change line 112 in file /opt/theforeman/tfm/root/usr/share/gems/gems/katello-4.1.1.42/app/models/katello/concerns/host_managed_extensions.rb https://projects.theforeman.org/projects/katello/repository/revisions/353ebfc0ab489458a9882c759bb3d7ec6b16f85d/diff/app/models/katello/concerns/host_managed_extensions.rb Best regards!
Hello team, We have another Customer that hit the same issue. The workaround has been applied from this Bugzilla but Customer has the following query: The patch made the hook trigger, but how do we pass the name of the host to the hook? When using an URL like this (which works for "Host updated" event): https://satellite.example.com/svv/provisioning/webhooks/build-exit/<%= @object.name %> we get the following error: Backtrace for 'undefined method '#name' for NilClass::Jail (NilClass)' error (Safemode::NoMethodError): undefined method '#name' for NilClass::Jail (NilClass)
The question (and cause for needinfo) in #22 is not really related to this BZ in any way, sorry for derailing the thread. If you reach out to us we'll always try to help, but raising needinfos on sat6-bugs is not the best way, there are better communication channels for this. > When using an URL like this (which works for "Host updated" event): The event triggered when a host is updated carries the whole host as @object so you can use @object.name on it. > but how do we pass the name of the host to the hook? If I'm reading things right then build status changes carry only the id and hostname of the host as @id and @hostname respectively, so you should be able to do https://satellite.example.com/svv/provisioning/webhooks/build-exit/<%= @hostname %>
*** Bug 2053451 has been marked as a duplicate of this bug. ***
Version-Release number of selected component (if applicable): - Satellite 6.11 - 18 Steps to Reproduce: 1. Create a host group with default Ansible roles. 1. Deploy a new host under that host group. Actual results: - A job running the hostgroup's ansible roles was scheduled. Expected results: - A job to run all assigned Ansible roles should be scheduled
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Moderate: Satellite 6.11 Release), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2022:5498