X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=modules%2Frole%2Fmanifests%2Fcryptoportfolio%2Ffront.pp;h=5f7c09739d3989635362db3fc674065acd19d47c;hb=96f8d0f037f8b8e93315e864bdaf661f45e3c472;hp=3612fd5aaa5c9667cddc3afcdebd705bfa66c79e;hpb=123ee097b8c8f69e8cade9f618585065d3fc7948;p=perso%2FImmae%2FProjets%2FPuppet.git diff --git a/modules/role/manifests/cryptoportfolio/front.pp b/modules/role/manifests/cryptoportfolio/front.pp index 3612fd5..5f7c097 100644 --- a/modules/role/manifests/cryptoportfolio/front.pp +++ b/modules/role/manifests/cryptoportfolio/front.pp @@ -6,7 +6,7 @@ class role::cryptoportfolio::front inherits role::cryptoportfolio { $password_seed = lookup("base_installation::puppet_pass_seed") - $cf_front_app = "${home}/go/src/immae.eu/Immae/Projets/Cryptomonnaies/Cryptoportfolio/Front" + $cf_front_app = "${home}/go/src/git.immae.eu/Cryptoportfolio/Front" $cf_front_app_api_workdir = "${cf_front_app}/cmd/app" $cf_front_app_api_bin = "${cf_front_app_api_workdir}/cryptoportfolio-app" $cf_front_app_api_conf = "${home}/conf.toml" @@ -23,11 +23,8 @@ class role::cryptoportfolio::front inherits role::cryptoportfolio { file { [ "${home}/go/", "${home}/go/src", - "${home}/go/src/immae.eu", - "${home}/go/src/immae.eu/Immae", - "${home}/go/src/immae.eu/Immae/Projets", - "${home}/go/src/immae.eu/Immae/Projets/Cryptomonnaies", - "${home}/go/src/immae.eu/Immae/Projets/Cryptomonnaies/Cryptoportfolio", + "${home}/go/src/git.immae.eu", + "${home}/go/src/git.immae.eu/Cryptoportfolio", $cf_front_app]: ensure => "directory", mode => "0700", @@ -151,6 +148,7 @@ class role::cryptoportfolio::front inherits role::cryptoportfolio { file { "/usr/local/bin/api_logger": mode => "0755", content => template("role/cryptoportfolio/api_logger.py.erb"), + notify => Service["cryptoportfolio-log"], } -> file { "/etc/systemd/system/cryptoportfolio-log.service": @@ -158,7 +156,10 @@ class role::cryptoportfolio::front inherits role::cryptoportfolio { owner => "root", group => "root", content => template("role/cryptoportfolio/cryptoportfolio-log.service.erb"), - notify => Exec["systemctl daemon-reload"], + notify => [ + Exec["systemctl daemon-reload"], + Service["cryptoportfolio-log"] + ] } -> service { 'cryptoportfolio-log': @@ -186,4 +187,16 @@ class role::cryptoportfolio::front inherits role::cryptoportfolio { } } + @profile::monitoring::external_service { "Cryptoportfolio website is running on $web_host": + type => "web", + master => { + check_command => "check_https!$web_host!/!Cryptoportfolio" + } + } + @profile::monitoring::external_service { "$web_host ssl certificate is up to date": + type => "web", + master => { + check_command => "check_https_certificate!$web_host" + } + } }