]>
Commit | Line | Data |
---|---|---|
1 | class 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", | |
12 | Optional[String] $redis_host = "/run/redis/redis.sock", | |
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, | |
18 | Optional[String] $trader_version = undef, | |
19 | Optional[String] $trader_sha256 = undef, | |
20 | ) { | |
21 | include "base_installation" | |
22 | ||
23 | include "profile::tools" | |
24 | include "profile::postgresql" | |
25 | include "profile::apache" | |
26 | include "profile::xmr_stak" | |
27 | include "profile::boinc" | |
28 | ||
29 | contain "role::cryptoportfolio::postgresql" | |
30 | contain "role::cryptoportfolio::apache" | |
31 | ||
32 | contain "role::cryptoportfolio::notify" | |
33 | ||
34 | unless empty($trader_version) { | |
35 | if versioncmp($trader_version, "v1.3") >= 0 { | |
36 | include "profile::redis" | |
37 | } | |
38 | contain "role::cryptoportfolio::bot" | |
39 | } | |
40 | ||
41 | # FIXME: restore backup | |
42 | unless empty($front_version) { | |
43 | contain "role::cryptoportfolio::front" | |
44 | } | |
45 | } |