]> git.immae.eu Git - perso/Immae/Projets/Puppet.git/blobdiff - modules/role/manifests/cryptoportfolio.pp
Change deploy script
[perso/Immae/Projets/Puppet.git] / modules / role / manifests / cryptoportfolio.pp
index 67d88fb7b38c97e21e2c0780d1b3788e2a937c7a..bec247ee0ff6a19771f39506a63d59259a5ab7a6 100644 (file)
@@ -272,7 +272,14 @@ class role::cryptoportfolio {
     unless empty($cf_webhook_url) {
       exec { "bot-slack-notify":
         refreshonly => true,
-        command     => "/usr/local/bin/slack-notify Trader '${cf_webhook_url}' '${bot_version}'",
+        environment => [
+          "P_PROJECT=Trader",
+          "P_WEBHOOK=${cf_webhook_url}",
+          "P_VERSION=${bot_version}",
+          "P_HOST=${cf_front_app_host}",
+          "P_HTTPS=${cf_front_app_ssl}",
+        ],
+        command     => "/usr/local/bin/slack-notify",
         require     => File["/usr/local/bin/slack-notify"],
         subscribe   => Exec["py-cryptoportfolio-dependencies"],
       }
@@ -407,7 +414,14 @@ class role::cryptoportfolio {
     unless empty($cf_webhook_url) {
       exec { "front-slack-notify":
         refreshonly => true,
-        command     => "/usr/local/bin/slack-notify Front '${cf_webhook_url}' '${front_version}'",
+        environment => [
+          "P_PROJECT=Front",
+          "P_WEBHOOK=${cf_webhook_url}",
+          "P_VERSION=${front_version}",
+          "P_HOST=${cf_front_app_host}",
+          "P_HTTPS=${cf_front_app_ssl}",
+        ],
+        command     => "/usr/local/bin/slack-notify",
         require     => File["/usr/local/bin/slack-notify"],
         subscribe   => [Exec["go-cryptoportfolio-app"], Exec["web-cryptoportfolio-build"]],
       }