RFC: Bulk and Automatic Client Registration WF

This RFC is similar to the one mentioned[1], where we are simplifying the registration process of the hosts into the Foreman.
This approach counts on Ansible Roles where there is a page on foreman(a dynamic page) under which we submit a file containing hostnames/IPs of the hosts which need to get registered.

[1] RFC: Simple & automatic host registration WF

  • Motivation & Goals:

    • Allow users to do Bulk registrations of the host(s) with one simple file that just have hostname/IP using Ansible Roles
  • Ideal Use Cases:

CASE 1:

- User needs to upload a file filled with hostnames and a generic username and password through which we can take SSH access to the client systems needs to get registered to foreman. 

- The main motive is to perform the below steps using Ansible Roles:

	- Clean the system for new registration. NOT to delete the VMs but just perform # subscription-manager clean
	- Register the client system based on the options that we have on Foreman e.g(Bootstrap/activation-key/SubMan commands). 
	- Ship SSH keys at the time of registration so that the Remote Execution feature should set up during the process. Since we are moving away from katello-agent a step where users need not to do any sort of extra setup. 

CASE 2:

	- While Migrating the hosts from one foreman setup to another, 
         considering that the same entries of Lifecycle-environments/content-views/subscriptions 
         are present then the host gets directly moved in bulk or in batches. 
       - ( for example:- This will help users to move from Satellite 6 to Satellite 7) 

  • Features and Templates can be the same mentioned under[1] but the approach should be Ansible Roles.

    [1] RFC: Simple & automatic host registration WF

  • Raw Work-Flow to register to deploy Ansible roles.

    • On the foreman, web UI user needs to mention the following entries, based on which ansible roles will work.

    • Upload the File having the hostnames/IP of the client systems.

    • Mention a common user to take ssh access to run an Ansible role on the client system. (Default: root/redhat)

    • Select the Org/loc under which the user wants for the client systems.

    • Select parameters like Subscriptions which should get assigned.

    • Lifecycle Environment and Content Views.

    • Scap Policies

    • Exchange SSH Keys

      • It the end, the user should get a report where which hosts completed this process and which host face any sort of issue at what point( task or play) should be notified in a form of a report.
  • Define (Extras):

    • How many ansible tasks should run in parallel on foreman? e.g 100 systems getting registered in a batch of 2(50 each).

Feedbacks are always welcome on this.