]> git.immae.eu Git - perso/Immae/Projets/Puppet.git/blame - modules/role/manifests/cryptoportfolio.pp
Add redis to cryptoportfolio
[perso/Immae/Projets/Puppet.git] / modules / role / manifests / cryptoportfolio.pp
CommitLineData
0a21fb6c
IB
1class role::cryptoportfolio (
2 String $user,
3 String $group,
4 String $home,
5 Optional[String] $env = "prod",
6 Optional[String] $webhook_url = undef,
7 String $pg_user,
8 String $pg_user_replication,
9 String $pg_db,
10 Optional[String] $pg_hostname = "localhost",
11 Optional[String] $pg_port = "5432",
d5f4e591 12 Optional[String] $redis_host = "/run/redis/redis.sock",
0a21fb6c
IB
13 Optional[String] $web_host = undef,
14 Optional[String] $web_port = "",
15 Optional[Boolean] $web_ssl = true,
16 Optional[String] $front_version = undef,
17 Optional[String] $front_sha256 = undef,
acaa9ea9
IB
18 Optional[String] $trader_version = undef,
19 Optional[String] $trader_sha256 = undef,
0a21fb6c 20) {
57ae81ea
IB
21 include "base_installation"
22
8af3ea1e 23 include "profile::tools"
57ae81ea 24 include "profile::postgresql"
2bb35074 25 include "profile::apache"
68bbff61 26 include "profile::xmr_stak"
57ae81ea 27
39e05b4e
IB
28 contain "role::cryptoportfolio::postgresql"
29 contain "role::cryptoportfolio::apache"
0a4ec379 30
39e05b4e 31 contain "role::cryptoportfolio::notify"
a4c92ff7 32
acaa9ea9 33 unless empty($trader_version) {
d5f4e591
IB
34 if versioncmp($trader_version, "v1.3") >= 0 {
35 include "profile::redis"
36 }
39e05b4e 37 contain "role::cryptoportfolio::bot"
236d7e6d
IB
38 }
39
9a6b0098 40 # FIXME: restore backup
76a321e1 41 unless empty($front_version) {
39e05b4e 42 contain "role::cryptoportfolio::front"
76a321e1 43 }
57ae81ea 44}