"action_class"=>"Actions::Katello::Host::Erratum::ApplicableErrataInstall"

Latest response

I'm trying to figure out a way to run that command on a host collection for patching.

Currently right now, for each host in a host collection I have to gather all the available errata and then server by server apply errata. This can take a while, especially doing large groups of systems.

I have found that this is done via the GUI:
Hosts > Host Collections > Click on host collection name > Under actions select Errata Installation > Select top left box to select all errata > Click Install Selected (I use Katello)

From there I see that all hosts in that host collection begin to update.

How can I replicate this via a hammer command on version 6.3.5?

Responses

Hello, try this:

hammer> host-collection erratum install --help
Usage:
     host-collection erratum install [OPTIONS]

Options:
 --errata ERRATA                         List of Errata to install
                                         Comma separated list of values. Values containing comma should be quoted or escaped with backslash
 --id HOST_COLLECTION_ID                 Host Collection ID
 --name HOST_COLLECTION_NAME             Host Collection Name
 --organization ORGANIZATION_NAME        Organization name to search by
 --organization-id ORGANIZATION_ID       organization ID
 --organization-label ORGANIZATION_LABEL Organization label to search by
 -h, --help                              print help
hammer> 

Thanks. I saw that but couldn't figure out how to list all available errata for a host collection. I don't see that option. I can do it for each host, but if possible is there a way to show all available errata for a host collection?

Hm, I am afraid there is no way for that. Neither API has a call for that.

Ok thank you.