From 2b2db3a23ac2bd8f661e235d07e2f6888169a41a Mon Sep 17 00:00:00 2001 From: Sebastian Bublitz Date: Tue, 20 Aug 2024 10:01:56 +0200 Subject: [PATCH] Fixes #37744: Line up Foreman and Katello registration data Without the interface being created within Foreman, global registration with a REX interface selected failes on Katello instaces due to the interface not existing within Foreman. --- .../provisioning_templates/registration/global_registration.erb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/views/unattended/provisioning_templates/registration/global_registration.erb b/app/views/unattended/provisioning_templates/registration/global_registration.erb index 973f1156c88..ece7599dc36 100644 --- a/app/views/unattended/provisioning_templates/registration/global_registration.erb +++ b/app/views/unattended/provisioning_templates/registration/global_registration.erb @@ -140,7 +140,9 @@ register_katello_host(){ <%= " --data 'host[organization_id]=#{@organization.id}' \\\n" if @organization -%> <%= " --data 'host[location_id]=#{@location.id}' \\\n" if @location -%> <%= " --data 'host[hostgroup_id]=#{@hostgroup.id}' \\\n" if @hostgroup -%> +<%= " --data 'host[operatingsystem_id]=#{@operatingsystem.id}' \\\n" if @operatingsystem -%> <%= " --data 'host[lifecycle_environment_id]=#{@lifecycle_environment_id}' \\\n" if @lifecycle_environment_id.present? -%> +<%= " --data host[interfaces_attributes][0][identifier]=#{shell_escape(@remote_execution_interface)} \\\n" if @remote_execution_interface.present? -%> <%= " --data 'setup_insights=#{@setup_insights}' \\\n" unless @setup_insights.nil? -%> <%= " --data 'setup_remote_execution=#{@setup_remote_execution}' \\\n" unless @setup_remote_execution.nil? -%> <%= " --data remote_execution_interface=#{shell_escape(@remote_execution_interface)} \\\n" if @remote_execution_interface.present? -%>