Chapter 12. Configuring host collections A host collection is a group of content hosts. This feature enables you to perform the same action on multiple hosts at once. These actions can include the installation, removal, and update of packages and errata, change of assigned lifecycle environment, and change of content view. You can create host collections to suit your requirements, and those of your company. For example, group hosts in host collections by function, department, or business unit. 12.1. Creating a host collection The following procedure shows how to create host collections. Procedure In the Satellite web UI, navigate to Hosts > Host Collections . Click New Host Collection . Add the Name of the host collection. Clear Unlimited Content Hosts , and enter the desired maximum number of hosts in the Limit field. Add the Description of the host collection. Click Save . CLI procedure To create a host collection, enter the following command: 12.2. Cloning a host collection The following procedure shows how to clone a host collection. Procedure In the Satellite web UI, navigate to Hosts > Host Collections . On the left hand panel, click the host collection you want to clone. Click Copy Collection . Specify a name for the cloned collection. Click Create . 12.3. Removing a host collection Use the following procedure to remove a host collection from Satellite. Procedure In the Satellite web UI, navigate to Hosts > Host Collections . Select the host collection that you want to remove. Under Select Action , click Remove . Click Delete to remove the host collection. 12.4. Adding a host to a host collection You can add a host to a host collection in the Satellite web UI. Prerequisites A host must be registered to Red Hat Satellite to add it to a Host Collection. For more information about registering hosts, see Section 4.3, "Registering hosts by using global registration" . Note that if you add a host to a host collection, the Satellite auditing system does not log the change. Procedure In the Satellite web UI, navigate to Hosts > All Hosts . Click the name of the host you want to modify. In the Host collections card, click the vertical ellipsis and select Add host to collections . Select the host collection. Click Add . CLI procedure To add a host to a host collection, enter the following command: 12.5. Adding hosts to a host collection in bulk You can add multiple hosts to a host collection. Prerequisites A host must be registered to Red Hat Satellite to add it to a host collection. For more information about registering hosts, see Section 4.3, "Registering hosts by using global registration" . Note that if you add a host to a host collection, the Satellite auditing system does not log the change. Procedure In the Satellite web UI, navigate to Hosts > Host Collections . Select the host collection where the host should be added. On the Hosts tab, select the Add subtab. Select the hosts to be added from the table and click Add Selected . CLI procedure To add multiple hosts to a host collection, enter the following command: 12.6. Removing a host from a host collection The following procedure shows how to remove hosts from host collections. Note that if you remove a host from a host collection, the host collection record in the database is not modified so the Satellite auditing system does not log the change. Procedure In the Satellite web UI, navigate to Hosts > Host Collections . Choose the desired host collection. On the Hosts tab, select the List/Remove subtab. Select the hosts you want to remove from the host collection and click Remove Selected . 12.7. Adding content to a host collection These steps show how to add content to host collections in Red Hat Satellite. 12.7.1. Adding packages to a host collection The following procedure shows how to add packages to host collections. Prerequisites The content to be added should be available in one of the existing repositories or added prior to this procedure. Content should be promoted to the environment where the hosts are assigned. Procedure In the Satellite web UI, navigate to Hosts > Host Collections . Select the host collection where the package should be added. On the Collection Actions tab, click Package Installation, Removal, and Update . To update all packages, click Update All Packages to use the default method. Alternatively, select the drop-down icon to the right of the button to select a method to use. Selecting the via remote execution - customize first menu entry will take you to the Job invocation page where you can customize the action. Select the Package or Package Group radio button as required. In the field provided, specify the package or package group name. Then click: Install - to install a new package using the default method. Alternatively, select the drop-down icon to the right of the button and select a method to use. Selecting the via remote execution - customize first menu entry will take you to the Job invocation page where you can customize the action. Update - to update an existing package in the host collection using the default method. Alternatively, select the drop-down icon to the right of the button and select a method to use. Selecting the via remote execution - customize first menu entry will take you to the Job invocation page where you can customize the action. 12.7.2. Viewing installed packages Use the following procedure to view the installed packages of a host. Procedure In the Satellite web UI, navigate to Hosts > All Hosts and select the name of the host. On the Content tab, Packages displays a list of installed packages. To see details of a package, select that package. The Details tab displays details of the selected package. The Files tab lists the files contained in the package. The Dependencies tab lists the dependencies of the package. The Repositories tab lists the repositories that contain the selected package. You can filter these by Library or Default organization . 12.7.3. Upgrading a package Use the following procedure to view the installed packages of a host. Procedure In the Satellite web UI, navigate to Hosts > All Hosts and select the name of the host that contains the package you want to upgrade. On the Content tab, select Packages . The Status column displays whether the package is upgradable or Up-to date. You cannot update an up-to-date package. From the list of packages, choose the package you want to upgrade and click the vertical ellipsis icon at the end of the line. Choose the Apply via Remote Execution to use Remote Execution, or Apply via customized remote execution if you want to customize the remote execution, for example, to set a time when it should be applied. Click Submit to upgrade the package. 12.7.4. Removing a package from a host Use the following procedure to remove an installed package from a host. Procedure In the Satellite web UI, navigate to Hosts > All Hosts and select the host containing the package you want to remove. On the Content tab, select Packages . Click the vertical ellipsis icon at the end of the line for the package you want to remove, and choose the Remove option. Click Submit . 12.7.5. Adding errata to a host collection The following procedure shows how to add errata to host collections. Prerequisites The errata to be added should be available in one of the existing repositories or added prior to this procedure. Errata should be promoted to the environment where the hosts are assigned. Procedure In the Satellite web UI, navigate to Hosts > Host Collections . Select the host collection where the errata should be added. On the Collection Actions tab, click Errata Installation . Select the errata you want to add to the host collection and click Install Selected to use the default method. Alternatively, select the drop-down icon to the right of the button to select a method to use. Selecting the via remote execution - customize first menu entry takes you to the Job invocation page where you can customize the action. 12.7.6. Adding errata to a single host Use the following procedure to add errata to a host. Procedure In the Satellite web UI, navigate to Hosts > All Hosts . Select the host you want to add errata to. Click Content and select the Errata tab. Select the errata you want to add to the host, or select the checkbox at the top of the list to add all installable errata. Click the checkbox to any errata you wish to remove from a full list. Using the vertical ellipsis icon to the errata you want to add to the host, select Apply via Remote Execution to use Remote Execution, or select Apply via customized remote execution if you want to customize the remote execution. Click Submit . 12.7.7. Applying installable errata Use the following procedure to view a list of installable errata and select errata to install. Procedure In the Satellite web UI, navigate to Hosts > All Hosts and select the host you require. If there are errata associated with the host, they are displayed in an Installable Errata card on the new Host page. On the Content tab, Errata displays installable errata for the chosen host. Click the checkbox for any errata you wish to install. Using the vertical ellipsis icon to the errata you want to add to the host, select Apply via Remote Execution to use Remote Execution. Select Apply via customized remote execution if you want to customize the remote execution. Click Submit . 12.7.8. Filter errata by type and severity Use the following procedure to filter errata by type or severity. Procedure In the Satellite web UI, navigate to Hosts > All Hosts and click the name of the host. On the Contents tab, Errata lists the errata associated with the selected host. Click Type to filter errata by type. You can filter to display errata of type Security, Bugfix, or Enhancement Click Severity to filter by severity. You can filter to display errata of severity N/A, Low, Moderate, Important, or Critical. To deselect your choice, return to the list of options and click the selected option again. You can also use the Errata card on the host page to pre-filter errata for type before display. 12.7.9. Viewing errata by applicable and installable Use the following procedure to view errata by applicable or installable. Procedure In the Satellite web UI, navigate to Hosts > All Hosts . Select the host name. Click the Overview tab. Under the Errata card, there are two types of Errata. Click Applicable to view errata that apply to a package installed on your host. Click Installable to view applicable errata that are available in the host content view and lifecycle environment. Click the link with number of errata under each type to see the list of all available errata of that type. Click security advisories , bug fixes , or enhancements under each type to view only the respective type of errata. 12.7.10. Generating a report for installable and applicable errata Use the following procedure to generate a report of installable or applicable errata on hosts. Procedure In the Satellite web UI, navigate to Monitor > Reports > Report Templates . Click Generate for the Host - Applicable Errata template. Optional: To schedule a report, click the calendar icon to the right of the Generate at field and choose the date and time you want for the generated report. Optional: To send a report to an e-mail address, select the Send report via e-mail checkbox, and in the Deliver to e-mail addresses field, enter the required e-mail address. Optional: Select another Output format for the report file. The default is CSV. Optional: To limit the report only to hosts found by the search query, click on Hosts filter and search from the available list of hosts. For a report on all available hosts, leave Hosts filter empty. Optional: To limit the report only to errata found by the search query, click on Errata filter and search from the available list of errata. For a report on all available errata, leave Errata filter empty. From the Installability list, select one of these options: Applicable to show all applicable errata. Installable to limit the report exclusively to errata that are accessible in the content view environments of your host that may be installed. Click Generate . Your browser automatically downloads the report file after Satellite creates it. If you have selected the Send report via e-mail option, the report is sent to your e-mail address. 12.7.11. Removing content from a host collection The following procedure shows how to remove packages from host collections. Procedure Click Hosts > Host Collections . Click the host collection where the package should be removed. On the Collection Actions tab, click Package Installation, Removal, and Update . Select the Package or Package Group radio button as required. In the field provided, specify the package or package group name. Click Remove to remove the package or package group using the default method. Alternatively, select the drop-down icon to the right of the button and select a method to use. Selecting the via remote execution - customize first menu entry will take you to the Job invocation page where you can customize the action. 12.7.12. Changing the lifecycle environment or content view of a host collection The following procedure shows how to change the assigned lifecycle environment or content view of host collections. Procedure In the Satellite web UI, navigate to Hosts > Host Collection . Selection the host collection where the lifecycle environment or content view should be changed. On the Collection Actions tab, click Change assigned Lifecycle Environment or Content View . Select the lifecycle environment to be assigned to the host collection. Select the required content view from the list. Click Assign . Note The changes take effect in approximately 4 hours. To make the changes take effect immediately, on the host, enter the following command: You can use remote execution to run this command on multiple hosts at the same time.

Commands:
hammer host-collection create --name " My_Host_Collection " --organization " My_Organization "
hammer host-collection add-host --host-ids My_Host_ID_1 --id My_Host_Collection_ID
hammer host-collection add-host --host-ids My_Host_ID_1 , My_Host_ID_2 --id My_Host_Collection_ID
subscription-manager refresh