]> git.immae.eu Git - perso/Immae/Projets/Puppet.git/commitdiff
Rename trader variable
authorIsmaël Bouya <ismael.bouya@normalesup.org>
Sun, 1 Apr 2018 09:08:40 +0000 (11:08 +0200)
committerIsmaël Bouya <ismael.bouya@normalesup.org>
Sun, 1 Apr 2018 09:08:40 +0000 (11:08 +0200)
environments/production/roles/cryptoportfolio.yaml
modules/role/manifests/cryptoportfolio.pp
modules/role/manifests/cryptoportfolio/bot.pp

index 7571791cedb6f56d471781fb9df220740cc98d11..8589c9b82891138f0e23b61083e0e94e40eed84d 100644 (file)
@@ -1,5 +1,5 @@
 ---
 role::cryptoportfolio::front_version: ~ # Overriden in LDAP
 role::cryptoportfolio::front_sha256: ~
-role::cryptoportfolio::bot_version: ~ # Overriden in LDAP
-role::cryptoportfolio::bot_sha256: ~
+role::cryptoportfolio::trader_version: ~ # Overriden in LDAP
+role::cryptoportfolio::trader_sha256: ~
index 799e297475ff6047234bf8fba5f27fda12a5019e..6a659cc8b30e53ff8b30fd6578c309fdf1194499 100644 (file)
@@ -14,8 +14,8 @@ class role::cryptoportfolio (
   Optional[Boolean] $web_ssl              = true,
   Optional[String]  $front_version        = undef,
   Optional[String]  $front_sha256         = undef,
-  Optional[String]  $bot_version          = undef,
-  Optional[String]  $bot_sha256           = undef,
+  Optional[String]  $trader_version       = undef,
+  Optional[String]  $trader_sha256        = undef,
 ) {
   include "base_installation"
 
@@ -29,7 +29,7 @@ class role::cryptoportfolio (
 
   contain "role::cryptoportfolio::notify"
 
-  unless empty($bot_version) {
+  unless empty($trader_version) {
     contain "role::cryptoportfolio::bot"
   }
 
index 7b62ae0120f60acb6224f6a360fc70adfc539494..082e82059ae43b9222759bce9a0d4c6bd9e209f0 100644 (file)
@@ -15,11 +15,11 @@ class role::cryptoportfolio::bot inherits role::cryptoportfolio {
     require => User["$user:"],
   }
 
-  archive { "${home}/trader_${bot_version}.tar.gz":
-    path          => "${home}/trader_${bot_version}.tar.gz",
-    source        => "https://git.immae.eu/releases/cryptoportfolio/trader/trader_${bot_version}.tar.gz",
+  archive { "${home}/trader_${trader_version}.tar.gz":
+    path          => "${home}/trader_${trader_version}.tar.gz",
+    source        => "https://git.immae.eu/releases/cryptoportfolio/trader/trader_${trader_version}.tar.gz",
     checksum_type => "sha256",
-    checksum      => $bot_sha256,
+    checksum      => $trader_sha256,
     cleanup       => false,
     extract       => true,
     user          => $user,
@@ -49,7 +49,7 @@ class role::cryptoportfolio::bot inherits role::cryptoportfolio {
     content => template("role/cryptoportfolio/bot_config.ini.erb"),
     require => [
       User["$user:"],
-      Archive["${home}/trader_${bot_version}.tar.gz"],
+      Archive["${home}/trader_${trader_version}.tar.gz"],
     ],
   }
 
@@ -58,7 +58,7 @@ class role::cryptoportfolio::bot inherits role::cryptoportfolio {
     environment => ["HOME=${home}","PATH=/usr/bin/","CRON_TZ=UTC"],
     require     => [
       File[$cf_bot_app_conf],
-      Archive["${home}/trader_${bot_version}.tar.gz"]
+      Archive["${home}/trader_${trader_version}.tar.gz"]
     ],
     jobs        => [
       {
@@ -86,7 +86,7 @@ class role::cryptoportfolio::bot inherits role::cryptoportfolio {
       environment => [
         "P_PROJECT=Trader",
         "P_WEBHOOK=${webhook_url}",
-        "P_VERSION=${bot_version}",
+        "P_VERSION=${trader_version}",
         "P_HOST=${web_host}",
         "P_HTTPS=${web_ssl}",
       ],