aboutsummaryrefslogtreecommitdiff
path: root/modules/role
diff options
context:
space:
mode:
Diffstat (limited to 'modules/role')
-rw-r--r--modules/role/manifests/cryptoportfolio/front.pp6
-rw-r--r--modules/role/templates/cryptoportfolio/api_logger.py.erb2
2 files changed, 6 insertions, 2 deletions
diff --git a/modules/role/manifests/cryptoportfolio/front.pp b/modules/role/manifests/cryptoportfolio/front.pp
index 3612fd5..aa57f4e 100644
--- a/modules/role/manifests/cryptoportfolio/front.pp
+++ b/modules/role/manifests/cryptoportfolio/front.pp
@@ -151,6 +151,7 @@ class role::cryptoportfolio::front inherits role::cryptoportfolio {
151 file { "/usr/local/bin/api_logger": 151 file { "/usr/local/bin/api_logger":
152 mode => "0755", 152 mode => "0755",
153 content => template("role/cryptoportfolio/api_logger.py.erb"), 153 content => template("role/cryptoportfolio/api_logger.py.erb"),
154 notify => Service["cryptoportfolio-log"],
154 } 155 }
155 -> 156 ->
156 file { "/etc/systemd/system/cryptoportfolio-log.service": 157 file { "/etc/systemd/system/cryptoportfolio-log.service":
@@ -158,7 +159,10 @@ class role::cryptoportfolio::front inherits role::cryptoportfolio {
158 owner => "root", 159 owner => "root",
159 group => "root", 160 group => "root",
160 content => template("role/cryptoportfolio/cryptoportfolio-log.service.erb"), 161 content => template("role/cryptoportfolio/cryptoportfolio-log.service.erb"),
161 notify => Exec["systemctl daemon-reload"], 162 notify => [
163 Exec["systemctl daemon-reload"],
164 Service["cryptoportfolio-log"]
165 ]
162 } 166 }
163 -> 167 ->
164 service { 'cryptoportfolio-log': 168 service { 'cryptoportfolio-log':
diff --git a/modules/role/templates/cryptoportfolio/api_logger.py.erb b/modules/role/templates/cryptoportfolio/api_logger.py.erb
index 3fb14a0..ad296e8 100644
--- a/modules/role/templates/cryptoportfolio/api_logger.py.erb
+++ b/modules/role/templates/cryptoportfolio/api_logger.py.erb
@@ -50,4 +50,4 @@ while True:
50 lines = [entry["MESSAGE"] for entry in list(j)] 50 lines = [entry["MESSAGE"] for entry in list(j)]
51 if len(lines) > 0: 51 if len(lines) > 0:
52 send_to_discord("\n".join(lines)) 52 send_to_discord("\n".join(lines))
53 time.sleep(3) 53 j.wait()