forked from voxpupuli/puppet-jenkins
-
Notifications
You must be signed in to change notification settings - Fork 0
/
params.pp
76 lines (73 loc) · 2.18 KB
/
params.pp
1
2
3
4
5
6
7
8
9
10
11
12
13
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
73
74
75
76
# Class: jenkins::params
#
#
class jenkins::params {
$version = 'installed'
$lts = true
$repo = true
$direct_download = undef
$service_enable = true
$service_ensure = 'running'
$install_java = true
$swarm_version = '2.0'
$default_plugins_host = 'https://updates.jenkins-ci.org'
$port = 8080
$prefix = ''
$cli_tries = 10
$cli_try_sleep = 10
$package_cache_dir = '/var/cache/jenkins_pkgs'
$package_name = 'jenkins'
$manage_datadirs = true
$localstatedir = '/var/lib/jenkins'
$manage_user = true
$user = 'jenkins'
$manage_group = true
$group = 'jenkins'
$_java_args = '-Djava.awt.headless=true -Djenkins.install.runSetupWizard=false'
$default_plugins = [
'credentials', # required by puppet_helper.groovy
]
case $::osfamily {
'Debian': {
$libdir = '/usr/share/jenkins'
$package_provider = 'dpkg'
$service_provider = undef
$config_hash_defaults = {
'JAVA_ARGS' => { value => $_java_args },
'AJP_PORT' => { value => '-1' },
}
}
'RedHat': {
$libdir = '/usr/lib/jenkins'
$package_provider = 'rpm'
case $::operatingsystem {
'Fedora': {
if versioncmp($::operatingsystemrelease, '19') >= 0 or $::operatingsystemrelease == 'Rawhide' {
$service_provider = 'redhat'
}
}
/^(RedHat|CentOS|Scientific|OracleLinux)$/: {
if versioncmp($::operatingsystemmajrelease, '7') >= 0 {
$service_provider = 'redhat'
}
}
default: {
$service_provider = undef
}
}
$config_hash_defaults = {
'JENKINS_JAVA_OPTIONS' => { value => $_java_args },
'JENKINS_AJP_PORT' => { value => '-1' },
}
}
default: {
$libdir = '/usr/lib/jenkins'
$package_provider = undef
$service_provider = undef
$config_hash_defaults = {
'JENKINS_JAVA_OPTIONS' => { value => $_java_args },
'JENKINS_AJP_PORT' => { value => '-1' },
}
}
}
}