diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-05-13 14:42:51 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-05-13 14:49:10 +0200 |
commit | 6b95d3bd38307c1bd320a16368d0a3753601730d (patch) | |
tree | 7a6f4d826dcbbf6b87889855a151cf424f7750e3 /modules/role/manifests | |
parent | c8511b2019b44360887d33a9626ec14c81736aee (diff) | |
download | Puppet-6b95d3bd38307c1bd320a16368d0a3753601730d.tar.gz Puppet-6b95d3bd38307c1bd320a16368d0a3753601730d.tar.zst Puppet-6b95d3bd38307c1bd320a16368d0a3753601730d.zip |
Add logger for cryptoportfolio
Diffstat (limited to 'modules/role/manifests')
-rw-r--r-- | modules/role/manifests/cryptoportfolio/front.pp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/modules/role/manifests/cryptoportfolio/front.pp b/modules/role/manifests/cryptoportfolio/front.pp index e676395..a6b25c4 100644 --- a/modules/role/manifests/cryptoportfolio/front.pp +++ b/modules/role/manifests/cryptoportfolio/front.pp | |||
@@ -143,6 +143,31 @@ class role::cryptoportfolio::front inherits role::cryptoportfolio { | |||
143 | refreshonly => true, | 143 | refreshonly => true, |
144 | } | 144 | } |
145 | 145 | ||
146 | # Slack logger | ||
147 | $slack_logger = lookup("role::cryptoportfolio::front::slack_logger") | ||
148 | unless empty($slack_logger) { | ||
149 | file { "/usr/local/bin/api_logger": | ||
150 | mode => "0755", | ||
151 | content => template("role/cryptoportfolio/api_logger.py.erb"), | ||
152 | } | ||
153 | -> | ||
154 | file { "/etc/systemd/system/cryptoportfolio-log.service": | ||
155 | mode => "0644", | ||
156 | owner => "root", | ||
157 | group => "root", | ||
158 | content => template("role/cryptoportfolio/cryptoportfolio-log.service.erb"), | ||
159 | notify => Exec["systemctl daemon-reload"], | ||
160 | } | ||
161 | -> | ||
162 | service { 'cryptoportfolio-log': | ||
163 | enable => true, | ||
164 | ensure => "running", | ||
165 | require => [ | ||
166 | Service["cryptoportfolio-app"], | ||
167 | ], | ||
168 | } | ||
169 | } | ||
170 | |||
146 | unless empty($webhook_url) { | 171 | unless empty($webhook_url) { |
147 | exec { "front-slack-notify": | 172 | exec { "front-slack-notify": |
148 | refreshonly => true, | 173 | refreshonly => true, |