diff options
Diffstat (limited to 'extraconfig/pre_deploy')
-rw-r--r-- | extraconfig/pre_deploy/rhel-registration/environment-rhel-registration.yaml | 2 | ||||
-rw-r--r-- | extraconfig/pre_deploy/rhel-registration/scripts/rhel-registration | 19 |
2 files changed, 10 insertions, 11 deletions
diff --git a/extraconfig/pre_deploy/rhel-registration/environment-rhel-registration.yaml b/extraconfig/pre_deploy/rhel-registration/environment-rhel-registration.yaml index 24557517..a5eb35c6 100644 --- a/extraconfig/pre_deploy/rhel-registration/environment-rhel-registration.yaml +++ b/extraconfig/pre_deploy/rhel-registration/environment-rhel-registration.yaml @@ -20,7 +20,7 @@ parameter_defaults: rhel_reg_user: "" rhel_reg_type: "" rhel_reg_method: "" - rhel_reg_sat_repo: "rhel-7-server-satellite-tools-6.1-rpms" + rhel_reg_sat_repo: "rhel-7-server-satellite-tools-6.2-rpms" rhel_reg_http_proxy_host: "" rhel_reg_http_proxy_port: "" rhel_reg_http_proxy_username: "" diff --git a/extraconfig/pre_deploy/rhel-registration/scripts/rhel-registration b/extraconfig/pre_deploy/rhel-registration/scripts/rhel-registration index 487857ef..c7d0b231 100644 --- a/extraconfig/pre_deploy/rhel-registration/scripts/rhel-registration +++ b/extraconfig/pre_deploy/rhel-registration/scripts/rhel-registration @@ -186,14 +186,13 @@ function retry() { set -e } -function detect_satellite_version { - ping_api=$REG_SAT_URL/katello/api/ping - if curl --retry ${retry_max_count} --retry-delay 10 --max-time 30 -L -k -s -D - -o /dev/null $ping_api | grep "200 OK"; then - echo Satellite 6 detected at $REG_SAT_URL - satellite_version=6 +function detect_satellite_server { + if curl --retry ${retry_max_count} --retry-delay 10 --max-time 30 -L -k -s -D - -o /dev/null $REG_SAT_URL/pub/katello-ca-consumer-latest.noarch.rpm | grep "200 OK"; then + echo Satellite 6 or beyond with Katello API detected at $REG_SAT_URL + katello_api_enabled=1 elif curl --retry ${retry_max_count} --retry-delay 10 --max-time 30 -L -k -s -D - -o /dev/null $REG_SAT_URL/rhn/Login.do | grep "200 OK"; then - echo Satellite 5 detected at $REG_SAT_URL - satellite_version=5 + echo Satellite 5 with RHN detected at $REG_SAT_URL + katello_api_enabled=0 else echo No Satellite detected at $REG_SAT_URL exit 1 @@ -231,8 +230,8 @@ case "${REG_METHOD:-}" in retry subscription-manager $repos ;; satellite) - detect_satellite_version - if [ "$satellite_version" = "6" ]; then + detect_satellite_server + if [ "$katello_api_enabled" = "1" ]; then repos="$repos --enable ${satellite_repo}" curl --retry ${retry_max_count} --retry-delay 10 --max-time 30 -L -k -O "$REG_SAT_URL/pub/katello-ca-consumer-latest.noarch.rpm" @@ -248,7 +247,7 @@ case "${REG_METHOD:-}" in rpm -Uvh katello-ca-consumer-latest.noarch.rpm || true retry subscription-manager register $opts retry subscription-manager $repos - retry yum install -y katello-agent || true # needed for errata reporting to satellite6 + yum install -y katello-agent || true # needed for errata reporting to satellite6 katello-package-upload # https://bugs.launchpad.net/tripleo/+bug/1711435 |