Optional[String] $pg_port = "5432",
Optional[String] $caldance_version = undef,
Optional[String] $caldance_sha256 = undef,
+ Optional[Array] $cron_pip = [],
) {
$password_seed = lookup("base_installation::puppet_pass_seed")
- $web_home = "/home/simon_descarpentries"
include "base_installation"
+ include "profile::mail"
include "profile::tools"
include "profile::postgresql"
include "profile::apache"
"SECRET_KEY" => $secret_key,
"DEBUG" => "False",
"LOG_FILE" => "$home/caldev_django.log",
+ "MEDIA_ROOT" => "$home/media",
"FROM_EMAIL" => $mail_from,
"EMAIL_HOST" => $smtp_host,
"EMAIL_PORT" => $smtp_port,
owner => $user,
group => $group,
require => User["$user:"],
+ } ->
+ file { "${home}/media":
+ ensure => "directory",
+ mode => "0755",
+ owner => "http",
+ group => "http",
}
exec { "initialize_venv":
path => "$caldance_app/www/static",
require => "all granted",
},
+ {
+ path => "$home/media",
+ require => "all granted",
+ options => ["-Indexes"],
+ },
{
path => "/",
provider => "location",
require => "valid-user",
auth_type => "Basic",
auth_name => "Authentification requise",
- auth_user_file => "$web_home/caldev/.htpasswd",
+ auth_user_file => "$home/htpasswd",
},
],
aliases => [
alias => "/static/",
path => "$caldance_app/www/static/",
},
+ {
+ alias => "/media/",
+ path => "$home/media/",
+ },
],
setenv => $apache_env,
wsgi_script_aliases => { "/" => "$caldance_app/main_app/wsgi.py" };
default: * => $::profile::apache::apache_vhost_default;
}
+
+ $mailtos = join($cron_pip, ",")
+ cron::job { "list_outdated_pip_packages":
+ ensure => present,
+ user => $user,
+ environment => concat(["HOME=${home}","MAILTO=${mailtos}"], $shell_env),
+ command => "${home}/virtualenv/bin/pip list --outdated",
+ minute => "15",
+ hour => "0",
+ require => Exec["initialize_venv"],
+ }
}