Create and manage content view filters and composite content views to provide content subsets or supersets to managed hosts.
Content views make content available through their associations with repositories. By default, content views display all repository contents. However, you can use filters to limit the range of content that is displayed to the hosts.
Satellite Server offers several types of filters. For example, you can filter content views by package name or by package group name. These filters are useful for maintaining a consistent software profile on systems in an environment.
You can also filter content views by errata ID, date, or type. These filters regulate the availability of errata for a controlled release across lifecycle environments.
You can use inclusion or exclusion logic with the content view filters. For example, if you filter a content view by package name, then you can select the option to include or exclude packages that match the criteria.
To create a filter for a content view by using the Satellite web UI, click → and then click the name of the content view to filter. Click the tab and then click . Add a name for the filter, and select which content type and inclusion type to use. Optionally add a description for the filter.
Alternatively, use the hammer command to create a filter for a content view:
[root@satellite ~]# hammer content-view filter create --name "Filter_name" \
--description "Description" --type rpm --inclusion false \
--content-view "Example content view" --organization "Organization_name"
Filter created.A content type defines the type of content to filter. Red Hat Satellite supports the following content type filters:
Filters packages based on their name and version number.
Filters packages based on their associated package group. The list of package groups includes those provided by the repositories that are included in the content view.
Filters the available errata in the content view repositories by errata type (Bug fix, Enhancement, or Security).
Filters errata based on a date range and an errata type (Bug fix, Enhancement, or Security).
Filters container images based on the tag name.
Filters specific module streams. This option does not filter non-modular content.
The inclusion type defines the initial content to use in the filter.
Two filter types are available: Include and Exclude.
If you use the Include type, then the content view starts with no content and you can use the filter rules to select the content to add.
Use the Include type to combine several content elements.
Filters of type Exclude start with all the content, and filter rules select which content to remove.
Use this type of filter to exclude only certain packages from the content view.
For a content view, you can use a combination of Include and Exclude filters.
When you publish a content view of this type, the Include filters run first, and then the Exclude filters run.
This filtering order requires first identifying the content to add to the filtered content view, and then defining the content to exclude from the filtered content.
Composite content views consist of content views that are composed of other content views. Use composite content views to reuse content views and to simplify content view management.
For example, you create a first content view called RHEL 9 that includes the Red Hat Enterprise Linux 9 for x86_64 - BaseOS RPMs 9 repository.
Then, you create a separate Custom Application content view to provide access to a repository with third-party application software.
If you create a composite content view to include both content views, then the composite content view enables access to both content views for content hosts.
Moreover, you can use composite content views to select the appropriate version for each included content view. Thus, you can select previous content view versions for your composite content view for control over the content.
A composite content view includes only content views that do not overlap repositories. For example, if two content views contain the same repository, then you cannot include both views in a composite content view.
To create a composite content view by using the Satellite web UI, click → and then click . Then, enter a name, a label, and optionally a description for the composite content view. Select the type and then click . On the page, select the content views and click .
Alternatively, use the hammer command to create a composite content view:
[root@satellite ~]# hammer content-view create --name "Composite_name" \
--description "Description" --composite --organization "Organization_name"
Content view created.Then, add content views to your composite content view:
[root@satellite ~]# hammer content-view component add \
--composite-content-view "Composite_name" \
--component-content-view "Content_view_1" \
--component-content-view-version "1.0" \
--organization "Organization_name"
Component added to content view.For more information, refer to the Managing Content Views chapter in the Managing Content Guide at https://access.redhat.com/documentation/en-us/red_hat_satellite/6.11/html-single/managing_content/index#Managing_Content_Views_content-management