From c49d00da1d9f0fca3eafa907862681baa0bacec2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Sun, 25 Feb 2018 18:14:36 +0100 Subject: Update bot and add database connection --- modules/role/manifests/cryptoportfolio.pp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'modules/role/manifests/cryptoportfolio.pp') 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 { $cf_pg_db = "cryptoportfolio" $cf_pg_password = generate_password(24, $password_seed, "postgres_cryptoportfolio") $cf_pg_replication_password = generate_password(24, $password_seed, "postgres_cryptoportfolio_replication") - $cf_pg_host = "localhost:5432" + $cf_pg_hostname = "localhost" + $cf_pg_port = "5432" + $cf_pg_host = "${cf_pg_hostname}:${cf_pg_port}" $cf_user = "cryptoportfolio" $cf_group = "cryptoportfolio" @@ -36,6 +38,8 @@ class role::cryptoportfolio { $cf_front_app_static_conf = "${cf_front_app}/cmd/web/env/prod.env" $cf_bot_app = "${cf_home}/bot" + $cf_bot_app_conf = "${cf_home}/bot_config.ini" + $cf_bot_app_reports = "${cf_home}/bot_reports" file { "/var/lib/postgres/data/certs": ensure => directory, @@ -213,6 +217,13 @@ class role::cryptoportfolio { require => User[$cf_user], refreshonly => true, } + + file { $cf_bot_app_conf: + owner => $cf_user, + group => $cf_group, + mode => "0600", + content => template("role/cryptoportfolio/bot_config.ini.erb") + } } unless empty($front_version) { -- cgit v1.2.3