aboutsummaryrefslogtreecommitdiff
path: root/modules/role/manifests
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2018-02-25 18:14:36 +0100
committerIsmaël Bouya <ismael.bouya@normalesup.org>2018-02-25 18:28:29 +0100
commitc49d00da1d9f0fca3eafa907862681baa0bacec2 (patch)
tree05cc2e8cd0269e95ae7324f5ef6277ff3eda980d /modules/role/manifests
parent3b48b3a5cc357ca861a2b388dde40a0109ca900f (diff)
downloadPuppet-c49d00da1d9f0fca3eafa907862681baa0bacec2.tar.gz
Puppet-c49d00da1d9f0fca3eafa907862681baa0bacec2.tar.zst
Puppet-c49d00da1d9f0fca3eafa907862681baa0bacec2.zip
Update bot and add database connection
Diffstat (limited to 'modules/role/manifests')
-rw-r--r--modules/role/manifests/cryptoportfolio.pp13
1 files changed, 12 insertions, 1 deletions
diff --git a/modules/role/manifests/cryptoportfolio.pp b/modules/role/manifests/cryptoportfolio.pp
index 9ed3375..32b4391 100644
--- a/modules/role/manifests/cryptoportfolio.pp
+++ b/modules/role/manifests/cryptoportfolio.pp
@@ -18,7 +18,9 @@ class role::cryptoportfolio {
18 $cf_pg_db = "cryptoportfolio" 18 $cf_pg_db = "cryptoportfolio"
19 $cf_pg_password = generate_password(24, $password_seed, "postgres_cryptoportfolio") 19 $cf_pg_password = generate_password(24, $password_seed, "postgres_cryptoportfolio")
20 $cf_pg_replication_password = generate_password(24, $password_seed, "postgres_cryptoportfolio_replication") 20 $cf_pg_replication_password = generate_password(24, $password_seed, "postgres_cryptoportfolio_replication")
21 $cf_pg_host = "localhost:5432" 21 $cf_pg_hostname = "localhost"
22 $cf_pg_port = "5432"
23 $cf_pg_host = "${cf_pg_hostname}:${cf_pg_port}"
22 24
23 $cf_user = "cryptoportfolio" 25 $cf_user = "cryptoportfolio"
24 $cf_group = "cryptoportfolio" 26 $cf_group = "cryptoportfolio"
@@ -36,6 +38,8 @@ class role::cryptoportfolio {
36 $cf_front_app_static_conf = "${cf_front_app}/cmd/web/env/prod.env" 38 $cf_front_app_static_conf = "${cf_front_app}/cmd/web/env/prod.env"
37 39
38 $cf_bot_app = "${cf_home}/bot" 40 $cf_bot_app = "${cf_home}/bot"
41 $cf_bot_app_conf = "${cf_home}/bot_config.ini"
42 $cf_bot_app_reports = "${cf_home}/bot_reports"
39 43
40 file { "/var/lib/postgres/data/certs": 44 file { "/var/lib/postgres/data/certs":
41 ensure => directory, 45 ensure => directory,
@@ -213,6 +217,13 @@ class role::cryptoportfolio {
213 require => User[$cf_user], 217 require => User[$cf_user],
214 refreshonly => true, 218 refreshonly => true,
215 } 219 }
220
221 file { $cf_bot_app_conf:
222 owner => $cf_user,
223 group => $cf_group,
224 mode => "0600",
225 content => template("role/cryptoportfolio/bot_config.ini.erb")
226 }
216 } 227 }
217 228
218 unless empty($front_version) { 229 unless empty($front_version) {