Merge "Add support for node groups in NetConfigDataLookup"
[apex-tripleo-heat-templates.git] / extraconfig / pre_deploy / rhel-registration / scripts / rhel-unregistration
1 #!/bin/bash
2
3 set -eux
4 set -o pipefail
5
6 case "${REG_METHOD:-}" in
7     portal|satellite)
8         # Allow unregistration to fail.
9         # We don't want to fail stack deletes if unregistration fails.
10         # Note that this will be a no-op on satellite 5, which doesn't support
11         # unregistering from the cli.
12         subscription-manager unregister || true
13         subscription-manager clean || true
14         ;;
15     disable)
16         echo "Disabling RHEL unregistration"
17         ;;
18     *)
19         echo "WARNING: only 'portal', 'satellite', and 'disable' are valid values for REG_METHOD."
20         exit 0
21 esac