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
|
# File 'manifests/service.pp', line 1
class gogs::service
(
$service_ensure = $gogs::service_ensure,
$service_name = $gogs::service_name,
$installation_directory = $gogs::installation_directory,
$sysconfig = $gogs::sysconfig,
$owner = $gogs::owner,
) {
case $::operatingsystem {
'RedHat': {
::gogs::sysconfig::centos { 'RedHat': }
}
'OracleLinux': {
::gogs::sysconfig::centos { 'OracleLinux': }
}
'CentOS': {
::gogs::sysconfig::centos { 'CentOS': }
}
'Debian': {
::gogs::sysconfig::debian { 'Debian': }
}
'Ubuntu': {
::gogs::sysconfig::debian { 'Ubuntu': }
}
default: {
fail("${::operatingsystem} not supported")
}
}
service { $service_name:
ensure => $service_ensure,
enable => true,
hasstatus => false,
hasrestart => false,
}
}
|