Fixes #22884 - Check RHSM version for hostname-override (#195)
The adding of a subscription-manager fact is failing on stock SLES12 installs as 'hostname -f' doesn't work "out of the box":
`hostname: Name or service not known`
This is due to /etc/hosts not having the FQDN associated with 127.0.0.1
Its an easy fix, but for automated provisioning/scripting we want to be sure the bootstrap rpm script will run without issues.
The subscription manager hostname-override fact isn't needed for subscription manager versions past 1.18.1-1, so we can skip this block of code for later versions.
This commit checks the subscription manager version before adding the hostname-override fact. This is something we should do anyways and it avoids the error for SLES. SLES will use subscription-manager-1.20.5-7.1.x86_64 or later, so this block of code isn't even needed.
Fixes #22884 - Check RHSM version for hostname-override (#195)
The adding of a subscription-manager fact is failing on
stock SLES12 installs as 'hostname -f' doesn't work "out of
the box":
`hostname: Name or service not known`
This is due to /etc/hosts not having the FQDN associated with
127.0.0.1
Its an easy fix, but for automated provisioning/scripting we
want to be sure the bootstrap rpm script will run without
issues.
The subscription manager hostname-override fact isn't
needed for subscription manager versions past 1.18.1-1,
so we can skip this block of code for later versions.
This commit checks the subscription manager version before
adding the hostname-override fact. This is something we
should do anyways and it avoids the error for SLES.
SLES will use subscription-manager-1.20.5-7.1.x86_64 or
later, so this block of code isn't even needed.