diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/base_installation/manifests/cronie.pp | 7 | ||||
-rw-r--r-- | modules/profile/manifests/xmr_stak.pp | 3 | ||||
-rw-r--r-- | modules/profile/templates/xmr_stak/xmr-stak.service.erb (renamed from modules/profile/files/xmr_stak/xmr-stak.service) | 3 |
3 files changed, 11 insertions, 2 deletions
diff --git a/modules/base_installation/manifests/cronie.pp b/modules/base_installation/manifests/cronie.pp index 72f2d8f..e8d5dfd 100644 --- a/modules/base_installation/manifests/cronie.pp +++ b/modules/base_installation/manifests/cronie.pp | |||
@@ -29,5 +29,12 @@ class base_installation::cronie inherits base_installation { | |||
29 | user => root, | 29 | user => root, |
30 | special => "reboot" | 30 | special => "reboot" |
31 | } | 31 | } |
32 | cron { 'pacman_keys': | ||
33 | ensure => present, | ||
34 | command => "pacman-key --populate archlinux", | ||
35 | user => root, | ||
36 | minute => "0", | ||
37 | hour => "1", | ||
38 | } | ||
32 | } | 39 | } |
33 | } | 40 | } |
diff --git a/modules/profile/manifests/xmr_stak.pp b/modules/profile/manifests/xmr_stak.pp index c8bbcdd..ccb6baa 100644 --- a/modules/profile/manifests/xmr_stak.pp +++ b/modules/profile/manifests/xmr_stak.pp | |||
@@ -1,6 +1,7 @@ | |||
1 | class profile::xmr_stak ( | 1 | class profile::xmr_stak ( |
2 | String $mining_pool, | 2 | String $mining_pool, |
3 | String $wallet, | 3 | String $wallet, |
4 | Optional[String] $cpulimit = "50", | ||
4 | Optional[String] $password = "x", | 5 | Optional[String] $password = "x", |
5 | ) { | 6 | ) { |
6 | ensure_resource('exec', 'systemctl daemon-reload', { | 7 | ensure_resource('exec', 'systemctl daemon-reload', { |
@@ -25,7 +26,7 @@ class profile::xmr_stak ( | |||
25 | mode => "0644", | 26 | mode => "0644", |
26 | owner => "root", | 27 | owner => "root", |
27 | group => "root", | 28 | group => "root", |
28 | source => "puppet:///modules/profile/xmr_stak/xmr-stak.service", | 29 | content => template("profile/xmr_stak/xmr-stak.service.erb"), |
29 | require => User["xmr_stak"], | 30 | require => User["xmr_stak"], |
30 | notify => Exec["systemctl daemon-reload"] | 31 | notify => Exec["systemctl daemon-reload"] |
31 | } | 32 | } |
diff --git a/modules/profile/files/xmr_stak/xmr-stak.service b/modules/profile/templates/xmr_stak/xmr-stak.service.erb index 93ee383..d63103b 100644 --- a/modules/profile/files/xmr_stak/xmr-stak.service +++ b/modules/profile/templates/xmr_stak/xmr-stak.service.erb | |||
@@ -8,8 +8,9 @@ WorkingDirectory=/var/lib/xmr_stak | |||
8 | Type=simple | 8 | Type=simple |
9 | User=xmr_stak | 9 | User=xmr_stak |
10 | Group=xmr_stak | 10 | Group=xmr_stak |
11 | ExecStart=/usr/bin/cpulimit --limit 90 /usr/bin/xmr-stak -c /var/lib/xmr_stak/xmr-stak.conf | 11 | ExecStart=/usr/bin/cpulimit --limit <%= @cpulimit %> /usr/bin/xmr-stak -c /var/lib/xmr_stak/xmr-stak.conf |
12 | Nice=19 | 12 | Nice=19 |
13 | 13 | ||
14 | [Install] | 14 | [Install] |
15 | WantedBy=multi-user.target | 15 | WantedBy=multi-user.target |
16 | |||