Project

General

Profile

Feature #32852

Add parameter to provisioning templates to run attach --auto after registering

Added by Doug Forster 4 months ago. Updated 2 months ago.

Status:
Closed
Priority:
Low
Assignee:
-
Category:
Templates
Target version:
Difficulty:
trivial
Triaged:
No
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

Add support to run "subscription-manager attach --auto" after a host is registered with an Activation Key in the Provisioning scripts. These are maintained in the Foreman repo but I didn't see a great fit for them there. Figured this would be a better place to report.

The problem is we have Foreman provisioning hosts and a RH Satellite providing content. When the existing provisioning script runs it adds all the non-RH repos to the hosts. When "subscription-manager attach --auto" is run it correctly grabs the RedHat VM/virtual-datacenter license.

Here is the provisioning script:
https://github.com/theforeman/foreman/blob/develop/app/views/unattended/provisioning_templates/snippet/redhat_register.erb

Suggested edit add this to the header: #
subscription_manager_auto_attach = 'false' Run attach --auto after registering. #
Add this just before the "subscription-manager repos --list" block at line 194:
<% if host_param_true?('subscription_manager_auto_attach', false) >
subscription-manager attach --auto
< end %>


Related issues

Has duplicate Katello - Feature #32851: Add parameter to provisioning templates to run attach --auto after registeringDuplicate

Associated revisions

Revision f40ef0db (diff)
Added by dforste 4 months ago

Fixes #32851 - Add parameter to run attach --auto

Add parameter to provisioning templates to run attach --auto after registering

History

#1 Updated by Doug Forster 4 months ago

  • Tracker changed from Bug to Feature

#2 Updated by The Foreman Bot 4 months ago

  • Status changed from New to Ready For Testing

#3 Updated by Jonathon Turel 4 months ago

  • Has duplicate Feature #32851: Add parameter to provisioning templates to run attach --auto after registering added

#4 Updated by The Foreman Bot 4 months ago

  • Fixed in Releases 3.0.0 added

#5 Updated by Ewoud Kohl van Wijngaarden 4 months ago

  • Target version set to 3.0.0
  • Category set to Templates

#6 Updated by Amit Upadhye 2 months ago

  • Status changed from Ready For Testing to Closed

Doug Forster wrote:

Add support to run "subscription-manager attach --auto" after a host is registered with an Activation Key in the Provisioning scripts. These are maintained in the Foreman repo but I didn't see a great fit for them there. Figured this would be a better place to report.

The problem is we have Foreman provisioning hosts and a RH Satellite providing content. When the existing provisioning script runs it adds all the non-RH repos to the hosts. When "subscription-manager attach --auto" is run it correctly grabs the RedHat VM/virtual-datacenter license.

Here is the provisioning script:
https://github.com/theforeman/foreman/blob/develop/app/views/unattended/provisioning_templates/snippet/redhat_register.erb

Suggested edit add this to the header: #
subscription_manager_auto_attach = 'false' Run attach --auto after registering. #
Add this just before the "subscription-manager repos --list" block at line 194:
<% if host_param_true?('subscription_manager_auto_attach', false) >
subscription-manager attach --auto
< end %>

Doug Forster wrote:

Add support to run "subscription-manager attach --auto" after a host is registered with an Activation Key in the Provisioning scripts. These are maintained in the Foreman repo but I didn't see a great fit for them there. Figured this would be a better place to report.

The problem is we have Foreman provisioning hosts and a RH Satellite providing content. When the existing provisioning script runs it adds all the non-RH repos to the hosts. When "subscription-manager attach --auto" is run it correctly grabs the RedHat VM/virtual-datacenter license.

Here is the provisioning script:
https://github.com/theforeman/foreman/blob/develop/app/views/unattended/provisioning_templates/snippet/redhat_register.erb

Suggested edit add this to the header: #
subscription_manager_auto_attach = 'false' Run attach --auto after registering. #
Add this just before the "subscription-manager repos --list" block at line 194:
<% if host_param_true?('subscription_manager_auto_attach', false) >
subscription-manager attach --auto
< end %>

I can see

Doug Forster wrote:

Add support to run "subscription-manager attach --auto" after a host is registered with an Activation Key in the Provisioning scripts. These are maintained in the Foreman repo but I didn't see a great fit for them there. Figured this would be a better place to report.

The problem is we have Foreman provisioning hosts and a RH Satellite providing content. When the existing provisioning script runs it adds all the non-RH repos to the hosts. When "subscription-manager attach --auto" is run it correctly grabs the RedHat VM/virtual-datacenter license.

Here is the provisioning script:
https://github.com/theforeman/foreman/blob/develop/app/views/unattended/provisioning_templates/snippet/redhat_register.erb

Suggested edit add this to the header: #
subscription_manager_auto_attach = 'false' Run attach --auto after registering. #
Add this just before the "subscription-manager repos --list" block at line 194:
<% if host_param_true?('subscription_manager_auto_attach', false) >
subscription-manager attach --auto
< end %>

I can see the PR has been merged however this is still in 'Ready For Testing'. I am marking this closed as per the state of the PR.

Also available in: Atom PDF