aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--environments/production/roles/cryptoportfolio.yaml4
-rw-r--r--modules/role/manifests/cryptoportfolio.pp6
-rw-r--r--modules/role/manifests/cryptoportfolio/bot.pp14
3 files changed, 12 insertions, 12 deletions
diff --git a/environments/production/roles/cryptoportfolio.yaml b/environments/production/roles/cryptoportfolio.yaml
index 7571791..8589c9b 100644
--- a/environments/production/roles/cryptoportfolio.yaml
+++ b/environments/production/roles/cryptoportfolio.yaml
@@ -1,5 +1,5 @@
1--- 1---
2role::cryptoportfolio::front_version: ~ # Overriden in LDAP 2role::cryptoportfolio::front_version: ~ # Overriden in LDAP
3role::cryptoportfolio::front_sha256: ~ 3role::cryptoportfolio::front_sha256: ~
4role::cryptoportfolio::bot_version: ~ # Overriden in LDAP 4role::cryptoportfolio::trader_version: ~ # Overriden in LDAP
5role::cryptoportfolio::bot_sha256: ~ 5role::cryptoportfolio::trader_sha256: ~
diff --git a/modules/role/manifests/cryptoportfolio.pp b/modules/role/manifests/cryptoportfolio.pp
index 799e297..6a659cc 100644
--- a/modules/role/manifests/cryptoportfolio.pp
+++ b/modules/role/manifests/cryptoportfolio.pp
@@ -14,8 +14,8 @@ class role::cryptoportfolio (
14 Optional[Boolean] $web_ssl = true, 14 Optional[Boolean] $web_ssl = true,
15 Optional[String] $front_version = undef, 15 Optional[String] $front_version = undef,
16 Optional[String] $front_sha256 = undef, 16 Optional[String] $front_sha256 = undef,
17 Optional[String] $bot_version = undef, 17 Optional[String] $trader_version = undef,
18 Optional[String] $bot_sha256 = undef, 18 Optional[String] $trader_sha256 = undef,
19) { 19) {
20 include "base_installation" 20 include "base_installation"
21 21
@@ -29,7 +29,7 @@ class role::cryptoportfolio (
29 29
30 contain "role::cryptoportfolio::notify" 30 contain "role::cryptoportfolio::notify"
31 31
32 unless empty($bot_version) { 32 unless empty($trader_version) {
33 contain "role::cryptoportfolio::bot" 33 contain "role::cryptoportfolio::bot"
34 } 34 }
35 35
diff --git a/modules/role/manifests/cryptoportfolio/bot.pp b/modules/role/manifests/cryptoportfolio/bot.pp
index 7b62ae0..082e820 100644
--- a/modules/role/manifests/cryptoportfolio/bot.pp
+++ b/modules/role/manifests/cryptoportfolio/bot.pp
@@ -15,11 +15,11 @@ class role::cryptoportfolio::bot inherits role::cryptoportfolio {
15 require => User["$user:"], 15 require => User["$user:"],
16 } 16 }
17 17
18 archive { "${home}/trader_${bot_version}.tar.gz": 18 archive { "${home}/trader_${trader_version}.tar.gz":
19 path => "${home}/trader_${bot_version}.tar.gz", 19 path => "${home}/trader_${trader_version}.tar.gz",
20 source => "https://git.immae.eu/releases/cryptoportfolio/trader/trader_${bot_version}.tar.gz", 20 source => "https://git.immae.eu/releases/cryptoportfolio/trader/trader_${trader_version}.tar.gz",
21 checksum_type => "sha256", 21 checksum_type => "sha256",
22 checksum => $bot_sha256, 22 checksum => $trader_sha256,
23 cleanup => false, 23 cleanup => false,
24 extract => true, 24 extract => true,
25 user => $user, 25 user => $user,
@@ -49,7 +49,7 @@ class role::cryptoportfolio::bot inherits role::cryptoportfolio {
49 content => template("role/cryptoportfolio/bot_config.ini.erb"), 49 content => template("role/cryptoportfolio/bot_config.ini.erb"),
50 require => [ 50 require => [
51 User["$user:"], 51 User["$user:"],
52 Archive["${home}/trader_${bot_version}.tar.gz"], 52 Archive["${home}/trader_${trader_version}.tar.gz"],
53 ], 53 ],
54 } 54 }
55 55
@@ -58,7 +58,7 @@ class role::cryptoportfolio::bot inherits role::cryptoportfolio {
58 environment => ["HOME=${home}","PATH=/usr/bin/","CRON_TZ=UTC"], 58 environment => ["HOME=${home}","PATH=/usr/bin/","CRON_TZ=UTC"],
59 require => [ 59 require => [
60 File[$cf_bot_app_conf], 60 File[$cf_bot_app_conf],
61 Archive["${home}/trader_${bot_version}.tar.gz"] 61 Archive["${home}/trader_${trader_version}.tar.gz"]
62 ], 62 ],
63 jobs => [ 63 jobs => [
64 { 64 {
@@ -86,7 +86,7 @@ class role::cryptoportfolio::bot inherits role::cryptoportfolio {
86 environment => [ 86 environment => [
87 "P_PROJECT=Trader", 87 "P_PROJECT=Trader",
88 "P_WEBHOOK=${webhook_url}", 88 "P_WEBHOOK=${webhook_url}",
89 "P_VERSION=${bot_version}", 89 "P_VERSION=${trader_version}",
90 "P_HOST=${web_host}", 90 "P_HOST=${web_host}",
91 "P_HTTPS=${web_ssl}", 91 "P_HTTPS=${web_ssl}",
92 ], 92 ],