From acaa9ea9b08b2cb4783194b0f06b494c1aabe9c1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Isma=C3=ABl=20Bouya?= Date: Sun, 1 Apr 2018 11:08:40 +0200 Subject: [PATCH] Rename trader variable --- environments/production/roles/cryptoportfolio.yaml | 4 ++-- modules/role/manifests/cryptoportfolio.pp | 6 +++--- modules/role/manifests/cryptoportfolio/bot.pp | 14 +++++++------- 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 @@ --- 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: ~ 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 ( 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" } 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 { 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}", ], -- 2.41.0