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
|
class profile::boinc (
Optional[String] $rpc_password = undef,
Optional[String] $rpc_host = undef,
) {
unless empty($rpc_host) or empty($rpc_password) {
ensure_packages(["boinc-nox", "lib32-glibc", "lib32-glib2"])
file { "/var/lib/boinc/gui_rpc_auth.cfg":
ensure => present,
content => $rpc_password,
owner => "boinc",
group => "boinc",
mode => "0600",
require => Package["boinc-nox"]
}
->
file { "/var/lib/boinc/remote_hosts.cfg":
ensure => present,
content => $rpc_host,
owner => "boinc",
group => "boinc",
mode => "0600",
}
->
service { "boinc":
enable => true,
ensure => "running",
}
}
}
|