List of Installable Updates per host on Satellite 6.3

Latest response

Hello guys,

On our new satellite I have to generate a report for each month with Installable Updates per host. I need host -> rpms that will be updated, not the ID of the errata or update. Any ideas how I can achieve that.

Responses

Try this:

hammer package list --host servername --packages-restrict-applicable yes
------|-----------------------------------------------------|--------------------------------------
ID    | FILENAME                                            | SOURCE RPM
------|-----------------------------------------------------|--------------------------------------
64134 | dhclient-4.1.1-53.P1.el6_9.4.x86_64.rpm             | dhcp-4.1.1-53.P1.el6_9.4.src.rpm
71813 | dhcp-common-4.1.1-53.P1.el6_9.4.x86_64.rpm          | dhcp-4.1.1-53.P1.el6_9.4.src.rpm
63242 | firefox-52.8.0-1.el6_9.x86_64.rpm                   | firefox-52.8.0-1.el6_9.src.rpm
56031 | kernel-2.6.32-696.28.1.el6.x86_64.rpm               | kernel-2.6.32-696.28.1.el6.src.rpm
59591 | kernel-2.6.32-696.30.1.el6.x86_64.rpm               | kernel-2.6.32-696.30.1.el6.src.rpm
68696 | kernel-devel-2.6.32-696.28.1.el6.x86_64.rpm         | kernel-2.6.32-696.28.1.el6.src.rpm
58260 | kernel-devel-2.6.32-696.30.1.el6.x86_64.rpm         | kernel-2.6.32-696.30.1.el6.src.rpm
72908 | kernel-firmware-2.6.32-696.28.1.el6.noarch.rpm      | kernel-2.6.32-696.28.1.el6.src.rpm
76020 | kernel-firmware-2.6.32-696.30.1.el6.noarch.rpm      | kernel-2.6.32-696.30.1.el6.src.rpm
51841 | kernel-headers-2.6.32-696.28.1.el6.x86_64.rpm       | kernel-2.6.32-696.28.1.el6.src.rpm
71533 | kernel-headers-2.6.32-696.30.1.el6.x86_64.rpm       | kernel-2.6.32-696.30.1.el6.src.rpm
54257 | microcode_ctl-1.17-25.6.el6_9.x86_64.rpm            | microcode_ctl-1.17-25.6.el6_9.src.rpm
66581 | microcode_ctl-1.17-25.7.el6_9.x86_64.rpm            | microcode_ctl-1.17-25.7.el6_9.src.rpm
51495 | patch-2.6-8.el6_9.x86_64.rpm                        | patch-2.6-8.el6_9.src.rpm
78451 | procps-3.2.8-45.el6_9.3.x86_64.rpm                  | procps-3.2.8-45.el6_9.3.src.rpm
24    | pulp-rpm-handlers-2.13.4.8-1.el6sat.noarch.rpm      | pulp-rpm-2.13.4.8-1.el6sat.src.rpm
9     | python-pulp-agent-lib-2.13.4.6-1.el6sat.noarch.rpm  | pulp-2.13.4.6-1.el6sat.src.rpm
10    | python-pulp-agent-lib-2.13.4.9-1.el6sat.noarch.rpm  | pulp-2.13.4.9-1.el6sat.src.rpm
22    | python-pulp-common-2.13.4.6-1.el6sat.noarch.rpm     | pulp-2.13.4.6-1.el6sat.src.rpm
7     | python-pulp-common-2.13.4.9-1.el6sat.noarch.rpm     | pulp-2.13.4.9-1.el6sat.src.rpm
13    | python-pulp-rpm-common-2.13.4.8-1.el6sat.noarch.rpm | pulp-rpm-2.13.4.8-1.el6sat.src.rpm
74996 | tzdata-2018e-3.el6.noarch.rpm                       | tzdata-2018e-3.el6.src.rpm

Oh, I have missed the packages-restrict-applicable options. Many thanks Gary!

This is the script i use to email me once a week

#Script to list all outstanding updates
#
#/bin/bash

HOST_LIST=$(hammer -u adm-name -p '******' --output csv host list | cut -f 2 -d ','| tail --lines=+2)

for host in $HOST_LIST
do
        echo -e "\n"$host
        hammer -u adm-name -p '******' host errata list --host $host
done

Which should list all your servers registered with the Satellite server.

ie

host1
------|----------------|-------------|-----------------------------------------------|------------
ID    | ERRATUM ID     | TYPE        | TITLE                                         | INSTALLABLE
------|----------------|-------------|-----------------------------------------------|------------
13336 | RHSA-2018:1777 | security    | Important: procps security update             | true       
13333 | RHEA-2018:1774 | enhancement | microcode_ctl enhancement update              | true       
13309 | RHSA-2018:1651 | security    | Important: kernel security and bug fix update | true       
13223 | RHSA-2018:1319 | security    | Important: kernel security and bug fix update | true       
13231 | RHBA-2018:1361 | bugfix      | ibus bug fix update                           | true       
13230 | RHBA-2018:1362 | bugfix      | vte bug fix update                            | true       
------|----------------|-------------|-----------------------------------------------|------------

host2
------|----------------|-------------|-----------------------------------------------|------------
ID    | ERRATUM ID     | TYPE        | TITLE                                         | INSTALLABLE
------|----------------|-------------|-----------------------------------------------|------------
13336 | RHSA-2018:1777 | security    | Important: procps security update             | true       
13333 | RHEA-2018:1774 | enhancement | microcode_ctl enhancement update              | true       
13309 | RHSA-2018:1651 | security    | Important: kernel security and bug fix update | true       
13305 | RHEA-2018:1580 | enhancement | microcode_ctl bug fix and enhancement update  | true       
13223 | RHSA-2018:1319 | security    | Important: kernel security and bug fix update | true       
13231 | RHBA-2018:1361 | bugfix      | ibus bug fix update                           | true       
13230 | RHBA-2018:1362 | bugfix      | vte bug fix update                            | true       
------|----------------|-------------|-----------------------------------------------|------------

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.