Puppet Class: graphdb::service::params
- Defined in:
- manifests/service/params.pp
Overview
Class: graphdb::service::params
This class exists to
-
Manage internally used module variables in a central place.
Parameters
This class does not provide any parameters.
Examples
This class is not intended to be used directly.
14 15 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 |
# File 'manifests/service/params.pp', line 14
class graphdb::service::params {
$operatingsystem = $facts['operatingsystem'] # lint:ignore:legacy_facts
$operatingsystemmajrelease = $facts['operatingsystemmajrelease'] # lint:ignore:legacy_facts
# OS service manager
case $operatingsystem {
'RedHat', 'CentOS', 'Fedora', 'Scientific', 'OracleLinux', 'SLC': {
if versioncmp($operatingsystemmajrelease, '7') >= 0 {
$service_provider= 'systemd'
$systemd_service_path = '/lib/systemd/system'
} else {
$service_provider= 'init'
$systemd_service_path = undef
}
}
'Amazon': {
if versioncmp($operatingsystemmajrelease, '2') >= 0 {
$service_provider= 'systemd'
$systemd_service_path = '/lib/systemd/system'
} else {
$service_provider= 'init'
$systemd_service_path = undef
}
}
'Debian': {
if versioncmp($operatingsystemmajrelease, '8') >= 0 {
$service_provider= 'systemd'
$systemd_service_path = '/lib/systemd/system'
} else {
$service_provider= 'init'
$systemd_service_path = undef
}
}
'Ubuntu': {
if versioncmp($operatingsystemmajrelease, '15') >= 0 {
$service_provider= 'systemd'
$systemd_service_path = '/lib/systemd/system'
} else {
$service_provider= 'upstart'
$systemd_service_path = undef
}
}
'OpenSuSE': {
$service_provider = 'systemd'
if versioncmp($operatingsystemmajrelease, '12') <= 0 {
$systemd_service_path = '/lib/systemd/system'
} else {
$systemd_service_path = '/usr/lib/systemd/system'
}
}
'OpenBSD': {
$service_provider = 'openbsd'
$systemd_service_path = undef
}
default: {
fail("\"${module_name}\" provides no service parameters for \"${operatingsystem}\"")
}
}
}
|