8.10. Content Filter Examples

Use any of the following examples with the procedure that follows to build custom content filters.

Example 1

Create a repository with the base Red Hat Enterprise Linux packages. This filter requires a Red Hat Enterprise Linux repository added to the Content View.

Filter:

  • Inclusion Type: Include
  • Content Type: Package Group
  • Filter: Select only the Base package group

Example 2

Create a repository that excludes all errata, except for security updates, after a certain date. This is useful if you want to perform system updates on a regular basis with the exception of critical security updates, which must be applied immediately. This filter requires a Red Hat Enterprise Linux repository added to the Content View.

Filter:

  • Inclusion Type: Exclude
  • Content Type: Erratum (by Date and Type)
  • Filter: Select only the Bugfix and Enhancement errata types, and clear the Security errata type. Set the Date Type to Updated On. Set the Start Date to the date you want to restrict errata. Leave the End Date blank to ensure any new non-security errata is filtered.

Example 3

A combination of Example 1 and Example 2 where you only require the operating system packages and want to exclude recent bug fix and enhancement errata. This requires two filters attached to the same Content View. The Content View processes the Include filter first, then the Exclude filter.

Filter 1:

  • Inclusion Type: Include
  • Content Type: Package Group
  • Filter: Select only the Base package group

Filter 2:

  • Inclusion Type: Exclude
  • Content Type: Erratum (by Date and Type)
  • Filter: Select only the Bugfix and Enhancement errata types, and clear the Security errata type. Set the Date Type to Updated On. Set the Start Date to the date you want to restrict errata. Leave the End Date blank to ensure any new non-security errata is filtered.

Example 4

Filter a specific module stream in a Content View.

Filter 1:

  • Inclusion Type: Include
  • Content Type: Module Stream
  • Filter: Select only the specific module stream that you want for the Content View, for example ant, and click Add Module Stream.

Filter 2:

  • Inclusion Type: Exclude
  • Content Type: Package
  • Filter: Add a rule to filter any non-modular packages that you want to exclude from the Content View. If you do not filter the packages, the Content View filter includes all non-modular packages associated with the module stream ant. Add a rule to exclude all * packages, or specify the package names that you want to exclude.

For another example of how content filters work, see the following article: "How do content filters work in Satellite 6".