+ $pg_password = generate_password(24, $password_seed, "postgres_caldance")
+ $secret_key = generate_password(24, $password_seed, "secret_key_caldance")
+
+ $environment = {
+ "DB_NAME" => $pg_db,
+ "DB_USER" => $pg_user,
+ "DB_PASSWORD" => $pg_password,
+ "DB_HOST" => $pg_hostname,
+ "DB_PORT" => $pg_port,
+ "SECRET_KEY" => $secret_key,
+ "DEBUG" => "False",
+ "LOG_FILE" => "$home/caldev_django.log",
+ "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" }
+
+ file { $home:
+ mode => "0755",
+ }
+ file { "${home}/caldev_django.log":
+ mode => "0664",
+ owner => $user,
+ group => "http",
+ content => "",
+ }