1 class profile::xmr_stak {
2 ensure_resource('exec', 'systemctl daemon-reload', {
3 command => '/usr/bin/systemctl daemon-reload',
7 ensure_packages(["cpulimit"])
8 aur::package { "xmr-stak_cpu": }
14 home => "/var/lib/xmr_stak",
17 require => Aur::Package["xmr-stak_cpu"],
20 file { "/etc/systemd/system/xmr-stak.service":
24 source => "puppet:///modules/profile/xmr_stak/xmr-stak.service",
25 require => User["xmr_stak"],
26 notify => Exec["systemctl daemon-reload"]
29 $mining_pool = lookup("xmr_stak::mining_pool") |$key| { {} }
30 $wallet = lookup("xmr_stak::wallet") |$key| { {} }
31 $password = lookup("xmr_stak::password") |$key| { "x" }
32 $instance = regsubst($facts["ec2_metadata"]["hostname"], "\.", "_", "G")
34 file { "/var/lib/xmr_stak/xmr-stak.conf":
38 content => template("profile/xmr_stak/xmr-stak.conf.erb"),
39 require => User["xmr_stak"],
46 Aur::Package["xmr-stak_cpu"],
47 File["/var/lib/xmr_stak/xmr-stak.conf"],
48 File["/etc/systemd/system/xmr-stak.service"]
51 Aur::Package["xmr-stak_cpu"],
52 File["/var/lib/xmr_stak/xmr-stak.conf"],
53 File["/etc/systemd/system/xmr-stak.service"]