Puppet Class: hp_spp::params
- Inherited by:
-
hp_spp
hp_spp::repo
hp_spp::hpams
hp_spp::hpsmh
hp_spp::hpsnmp
hp_spp::hphealth
- Defined in:
- manifests/params.pp
Overview
Class: hp_spp::params
This class handles OS-specific configuration of the hp_spp module. It looks for variables in top scope (probably from an ENC such as Dashboard). If the variable doesn’t exist in top scope, it falls back to a hard coded default value.
Authors:
Mike Arnold <mike@razorsedge.org>
Copyright:
Copyright © 2013 Mike Arnold, unless otherwise noted.
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 |
# File 'manifests/params.pp', line 16
class hp_spp::params {
$gid = '490'
$uid = '490'
# Customize these values if you (for example) mirror public YUM repos to your
# internal network.
$yum_priority = '50'
$yum_protect = '0'
# If we have a top scope variable defined, use it, otherwise fall back to a
# hardcoded value.
$hp_spp_yum_server = getvar('::hp_spp_yum_server')
if $hp_spp_yum_server {
$yum_server = $::hp_spp_yum_server
} else {
$yum_server = 'http://downloads.linux.hpe.com'
}
$hp_spp_spp_version = getvar('::hp_spp_spp_version')
if $hp_spp_spp_version {
$spp_version = $::hp_spp_spp_version
} else {
$spp_version = 'current'
}
### The following parameters should not need to be changed.
$hp_spp_ensure = getvar('::hp_spp_ensure')
if $hp_spp_ensure {
$ensure = $::hp_spp_ensure
} else {
$ensure = 'present'
}
$hp_spp_service_ensure = getvar('::hp_spp_service_ensure')
if $hp_spp_service_ensure {
$service_ensure = $::hp_spp_service_ensure
} else {
$service_ensure = 'running'
}
# Since the top scope variable could be a string (if from an ENC), we might
# need to convert it to a boolean.
$hp_spp_autoupgrade = getvar('::hp_spp_autoupgrade')
if $hp_spp_autoupgrade {
$autoupgrade = $::hp_spp_autoupgrade
} else {
$autoupgrade = false
}
if is_string($autoupgrade) {
$safe_autoupgrade = str2bool($autoupgrade)
} else {
$safe_autoupgrade = $autoupgrade
}
$hp_spp_service_enable = getvar('::hp_spp_service_enable')
if $hp_spp_service_enable {
$service_enable = $::hp_spp_service_enable
} else {
$service_enable = true
}
if is_string($service_enable) {
$safe_service_enable = str2bool($service_enable)
} else {
$safe_service_enable = $service_enable
}
$gpg_path = '/SDR/'
case $::operatingsystem {
'RedHat': {
$yum_path = '/SDR/repo/spp/RedHat/$releasever/$basearch/'
case $::operatingsystemrelease {
/^5.[0-2]$/: {
$ipmi_package_name = 'hp-OpenIPMI'
$ilo_package_ensure = 'present'
$ilo_service_ensure = 'running'
$ilo_service_enable = true
}
/^5.[3-4]$/: {
$ipmi_package_name = 'hp-OpenIPMI'
$ilo_package_ensure = 'absent'
$ilo_service_ensure = undef
$ilo_service_enable = undef
}
default: {
$ipmi_package_name = 'OpenIPMI'
$ilo_package_ensure = 'absent'
$ilo_service_ensure = undef
$ilo_service_enable = undef
}
}
case $::operatingsystemrelease {
/^6/: {
$arrayweb_package_name = 'cpqacuxe'
$arraycli_package_name = 'hpacucli'
}
/^7/: {
$arrayweb_package_name = 'hpssa'
$arraycli_package_name = 'hpssacli'
}
default: {
$arrayweb_package_name = unset
$arraycli_package_name = unset
}
}
}
# If we are not on a supported OS, do not do anything.
default: { }
}
}
|