]> git.immae.eu Git - perso/Immae/Projets/Puppet.git/blobdiff - modules/role/manifests/caldance.pp
Add arbitrary environments to caldance
[perso/Immae/Projets/Puppet.git] / modules / role / manifests / caldance.pp
index 5bc39120841621630e5bd2ee78b975a773eb3983..c99892eb27cfbf1029763ae3494521fcb8165f2e 100644 (file)
@@ -40,9 +40,6 @@ class role::caldance (
     "DEBUG"       => "False",
     "LOG_FILE"    => "$home/caldev_django.log",
     "MEDIA_ROOT"  => "$home/media",
-    "FROM_EMAIL"  => $mail_from,
-    "EMAIL_HOST"  => $smtp_host,
-    "EMAIL_PORT"  => $smtp_port,
   }
   $shell_env = $environment.map |$key, $value| { "$key=$value" }
   $apache_env = $environment.map |$key, $value| { "CALDANCE_$key   $value" }
@@ -180,6 +177,7 @@ class role::caldance (
     ssl_key             => "/etc/letsencrypt/live/$web_host/privkey.pem",
     ssl_chain           => "/etc/letsencrypt/live/$web_host/chain.pem",
     require             => Letsencrypt::Certonly[$web_host],
+    additional_includes => "$home/caldance_env",
     directories         => [
       {
         path    => "$caldance_app/main_app",
@@ -189,6 +187,11 @@ class role::caldance (
         path    => "$caldance_app/www/static",
         require => "all granted",
       },
+      {
+        path    => "$home/media",
+        require => "all granted",
+        options => ["-Indexes"],
+      },
       {
         path           => "/",
         provider       => "location",
@@ -203,6 +206,10 @@ class role::caldance (
         alias => "/static/",
         path => "$caldance_app/www/static/",
       },
+      {
+        alias => "/media/",
+        path => "$home/media/",
+      },
     ],
     setenv              => $apache_env,
     wsgi_script_aliases => { "/" => "$caldance_app/main_app/wsgi.py" };