diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-04-21 15:20:15 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-04-21 15:30:48 +0200 |
commit | bdcfd78f03d54b20c25805b24b0443f2a107e72b (patch) | |
tree | a4114a8dd07beb1c51c0934730e95f5a9e50a9c5 /modules/profile | |
parent | d5f4e591f9cfedefdd4a71515b46c78e9a77e2ad (diff) | |
download | Puppet-bdcfd78f03d54b20c25805b24b0443f2a107e72b.tar.gz Puppet-bdcfd78f03d54b20c25805b24b0443f2a107e72b.tar.zst Puppet-bdcfd78f03d54b20c25805b24b0443f2a107e72b.zip |
Add boinc to use spare CPUs
Diffstat (limited to 'modules/profile')
-rw-r--r-- | modules/profile/manifests/boinc.pp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/modules/profile/manifests/boinc.pp b/modules/profile/manifests/boinc.pp new file mode 100644 index 0000000..43c4a49 --- /dev/null +++ b/modules/profile/manifests/boinc.pp | |||
@@ -0,0 +1,30 @@ | |||
1 | class profile::boinc ( | ||
2 | Optional[String] $rpc_password = undef, | ||
3 | Optional[String] $rpc_host = undef, | ||
4 | ) { | ||
5 | unless empty($rpc_host) or empty($rpc_password) { | ||
6 | ensure_packages(["boinc-nox"]) | ||
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": | ||
26 | enable => true, | ||
27 | ensure => "running", | ||
28 | } | ||
29 | } | ||
30 | } | ||