Host.params in kick start while safemode render is enable

can not add host.params in kick start while safemode render is enable

I added below parameter in kickstart template
subscription-manager register --org=“<%= @host.rhsm_organization_label %>” --activationkey=“<%=@host.params[‘kt_activation_keys’] %>”

Then I can not review kickstart template
Got below error in preview

image

Please help me.

**Foreman and Proxy versions::1.23-devlop nightly)
Katello Version : nightly

Thanks
Laxman

created host parameter as below .
is it safe to disable safemode render ?

Thanks
Laxman

Can you try host_params(‘kt_activation_keys') before disabling safemode?

Safemode simple disallows some constructs that can be unsafe, so depending on what you do it could be safe or not. I always try to leave it enabled.

2 Likes

Haven’t we deprecated params macro? Use host_params now.

Updated kt_activation_keys in kickstart template as you said. I didn’t change safemode render to false

subscription-manager register --org=Default_Organization --activationkey=<% host_params(‘kt_activation_keys’) %>

I got below error.

Thanks
Laxman

It should be host_param (singular).

1 Like

I updated as below. It is working now

subscription-manager register --org=Default_Organization --activationkey="<%= host_param(‘kt_activation_keys’) %>"

Thanks
Laxman