X-Git-Url: https://git.immae.eu/?p=perso%2FImmae%2FProjets%2FPuppet.git;a=blobdiff_plain;f=modules%2Fprofile%2Fmanifests%2Fxmr_stak.pp;h=93aa37d185fa675d18d5427b5b02a0503644de4c;hp=afa72a5dc37d0ad961c92ee9a99adea986c2231f;hb=42c7bdd646cc90d156a2f02176a539540ffaaf48;hpb=b3ac23bb9960207194de901275f33a72b0779690 diff --git a/modules/profile/manifests/xmr_stak.pp b/modules/profile/manifests/xmr_stak.pp index afa72a5..93aa37d 100644 --- a/modules/profile/manifests/xmr_stak.pp +++ b/modules/profile/manifests/xmr_stak.pp @@ -11,7 +11,16 @@ class profile::xmr_stak ( }) ensure_packages(["cpulimit"]) - aur::package { "xmr-stak_cpu": } + aur::package { "xmr-stak_cpu": + ensure => "absent" + } -> + aur::package { "xmr-stak": } + ~> + exec { "remove cpu.txt": + command => "/usr/bin/rm /var/lib/xmr_stak/cpu.txt", + refreshonly => true, + before => Service["xmr-stak"], + } user { "xmr_stak": name => "xmr_stak", @@ -20,7 +29,7 @@ class profile::xmr_stak ( home => "/var/lib/xmr_stak", system => true, password => "!!", - require => Aur::Package["xmr-stak_cpu"], + require => Aur::Package["xmr-stak"], } file { "/etc/systemd/system/xmr-stak.service": @@ -46,12 +55,12 @@ class profile::xmr_stak ( enable => true, ensure => "running", subscribe => [ - Aur::Package["xmr-stak_cpu"], + Aur::Package["xmr-stak"], File["/var/lib/xmr_stak/xmr-stak.conf"], File["/etc/systemd/system/xmr-stak.service"] ], require => [ - Aur::Package["xmr-stak_cpu"], + Aur::Package["xmr-stak"], File["/var/lib/xmr_stak/xmr-stak.conf"], File["/etc/systemd/system/xmr-stak.service"] ]