Red Hat Satellite Content View package and errata reports

Red Hat Satellite 6.10.7 login

In order to produce a report of packages contained in a Content View in Red Hat Satellite, the following hammer command can be used:

hammer --csv package list --content-view CV-Name --content-view-version x.y --organization ACME --per-page N

where CV-Name is the name is the name of the content view, x.y is the content version (such as 1.0, 2.0, etc) and N is the number of records that you wish to return. For example, a content view with the name RHEL-Latest at version 12.0 containing 36000 RPMs, the following would be used:

hammer --csv package list --content-view RHEL-8-Latest --content-view-version 12.0 --organization ACME --per-page 36100

I’ve added an extra 100 to the ‘–per-page’ argument to make sure that everything is included.

The output will be a CSV with output similar to the following:

# hammer --csv package list --content-view RHEL-8-Latest --content-view-version 12.0 --organization ACME --per-page 5
Id,Filename,Source RPM

It’s also possible to report on the errata content within a view as follows:

# hammer --csv erratum list --content-view RHEL-8-Latest --content-view-version 12.0 --organization ACME --per-page 36100

Sample output:

# hammer --csv erratum list --content-view RHEL-8-Latest --content-view-version 12.0 --organization ACME --per-page 5
Id,Errata ID,Type,Title,Issued,Updated
73296,RHSA-2022:5468,security,Important: php:8.0 security update,2022-06-30,2022-06-30
73295,RHSA-2022:5467,security,Important: php:7.4 security update,2022-06-30,2022-06-30
73286,RHSA-2022:5469,security,Important: firefox security update,2022-06-30,2022-06-30
73285,RHSA-2022:5470,security,Important: thunderbird security update,2022-06-30,2022-06-30
73299,RHBA-2022:5332,bugfix,scap-security-guide bug fix and enhancement update,2022-06-28,2022-06-28

The output from these reports can be shared with teams who may want to know what patch levels their servers will be updated to.

Leave a Reply

Your email address will not be published. Required fields are marked *