Exclude rpms from update via Satellite

Latest response

I'm using Satellite 6.1 We need a way to exclude certain rpms from being included in the upgrade process. The rpm exclusion needs to be managed from Satellite, and not from the client-node. We tried placing the packages we didn't want upgraded in /etc/yum.conf file (on the client), but Satellite doesn't appear to read a clients /etc/yum.conf file.

Is there a way to exclude rpms from Satellite run upgrades using Satellite?

Thanks.

Responses

Hello

As a guess I would take a look at the Job templates you use for pushing updates from satellite to clients, you are probably going to be using "Install Errata - Katello SSH Default" or "Install Group - Katello SSH Default"

I would do something along the lines off

# Helper function that exits with a particular message and code.
#
# Usage:
#   exit_with_message "Could not do a thing" 2
#
function exit_with_message() {
  echo "${1}, exiting..."
  exit $2
}

  # Pre Script
  $USER_INPUT[pre_script]
  RETVAL=$?
  [ $RETVAL -eq 0 ] || exit_with_message "Pre script failed" $RETVAL

# Action
  yum -y update --advisories=$USER_INPUT[errata] --exclude=PACKAGENAME
RETVAL=$?
[ $RETVAL -eq 0 ] || exit_with_message "Package action failed" $RETVAL

  # Post Script
  $USER_INPUT[post_script]
  RETVAL=$?
  [ $RETVAL -eq 0 ] || exit_with_message "Post script failed" $RETVAL

Hope that helps

Thanks for the reply. I will check our templates. Many thanks for the code!

Close

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