1 class profile::xmr_stak (
4 Optional[String] $cpulimit = "50",
5 Optional[String] $password = "x",
7 unless empty($mining_pool) or $cpulimit == "0" {
8 ensure_resource('exec', 'systemctl daemon-reload', {
9 command => '/usr/bin/systemctl daemon-reload',
13 ensure_packages(["cpulimit"])
14 aur::package { "xmr-stak_cpu": }
20 home => "/var/lib/xmr_stak",
23 require => Aur::Package["xmr-stak_cpu"],
26 file { "/etc/systemd/system/xmr-stak.service":
30 content => template("profile/xmr_stak/xmr-stak.service.erb"),
31 require => User["xmr_stak"],
32 notify => Exec["systemctl daemon-reload"]
35 $instance = regsubst(lookup("base_installation::ldap_cn"), '\.', "_", "G")
37 file { "/var/lib/xmr_stak/xmr-stak.conf":
41 content => template("profile/xmr_stak/xmr-stak.conf.erb"),
42 require => User["xmr_stak"],
49 Aur::Package["xmr-stak_cpu"],
50 File["/var/lib/xmr_stak/xmr-stak.conf"],
51 File["/etc/systemd/system/xmr-stak.service"]
54 Aur::Package["xmr-stak_cpu"],
55 File["/var/lib/xmr_stak/xmr-stak.conf"],
56 File["/etc/systemd/system/xmr-stak.service"]