]> git.immae.eu Git - perso/Immae/Projets/Puppet.git/blobdiff - modules/role/manifests/cryptoportfolio.pp
Handle postgresql sockets for cryptoportfolio app
[perso/Immae/Projets/Puppet.git] / modules / role / manifests / cryptoportfolio.pp
index 799e297475ff6047234bf8fba5f27fda12a5019e..5aaaee3579ac669a20b9ac593317186f38fea938 100644 (file)
@@ -7,15 +7,16 @@ class role::cryptoportfolio (
   String            $pg_user,
   String            $pg_user_replication,
   String            $pg_db,
-  Optional[String]  $pg_hostname          = "localhost",
+  Optional[String]  $pg_hostname          = "/run/postgresql",
   Optional[String]  $pg_port              = "5432",
+  Optional[String]  $redis_host           = "/run/redis/redis.sock",
   Optional[String]  $web_host             = undef,
   Optional[String]  $web_port             = "",
   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"
 
@@ -23,13 +24,17 @@ class role::cryptoportfolio (
   include "profile::postgresql"
   include "profile::apache"
   include "profile::xmr_stak"
+  include "profile::boinc"
 
   contain "role::cryptoportfolio::postgresql"
   contain "role::cryptoportfolio::apache"
 
   contain "role::cryptoportfolio::notify"
 
-  unless empty($bot_version) {
+  unless empty($trader_version) {
+    if versioncmp($trader_version, "v1.3") >= 0 {
+      include "profile::redis"
+    }
     contain "role::cryptoportfolio::bot"
   }