]> git.immae.eu Git - perso/Immae/Projets/Puppet.git/blame - modules/profile/manifests/boinc.pp
Merge branch 'dev'
[perso/Immae/Projets/Puppet.git] / modules / profile / manifests / boinc.pp
CommitLineData
bdcfd78f
IB
1class profile::boinc (
2 Optional[String] $rpc_password = undef,
3 Optional[String] $rpc_host = undef,
4) {
5 unless empty($rpc_host) or empty($rpc_password) {
7e8517ec 6 ensure_packages(["boinc-nox", "lib32-glibc", "lib32-glib2"], { ensure => latest })
bdcfd78f
IB
7
8 file { "/var/lib/boinc/gui_rpc_auth.cfg":
9 ensure => present,
10 content => $rpc_password,
11 owner => "boinc",
12 group => "boinc",
13 mode => "0600",
14 require => Package["boinc-nox"]
15 }
16 ->
17 file { "/var/lib/boinc/remote_hosts.cfg":
18 ensure => present,
19 content => $rpc_host,
20 owner => "boinc",
21 group => "boinc",
22 mode => "0600",
23 }
24 ->
25 service { "boinc":
7e8517ec
IB
26 enable => false,
27 ensure => "stopped",
28 } ->
29 service { "boinc-client":
bdcfd78f
IB
30 enable => true,
31 ensure => "running",
32 }
33 }
34}