aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2019-04-09 17:01:18 +0200
committerIsmaël Bouya <ismael.bouya@normalesup.org>2019-04-09 17:22:33 +0200
commit01d9e644c9199b1983a974a088a0029e666e5440 (patch)
tree787495488d4acf66e647a4b2f6c07f8e6c72e550 /modules
parentb1072a4737c3583840a8dfa1a9496ef210909740 (diff)
downloadPuppet-01d9e644c9199b1983a974a088a0029e666e5440.tar.gz
Puppet-01d9e644c9199b1983a974a088a0029e666e5440.tar.zst
Puppet-01d9e644c9199b1983a974a088a0029e666e5440.zip
Add cron mails to list outdated packages in caldance
Diffstat (limited to 'modules')
-rw-r--r--modules/role/manifests/caldance.pp13
1 files changed, 13 insertions, 0 deletions
diff --git a/modules/role/manifests/caldance.pp b/modules/role/manifests/caldance.pp
index 6bac0bc..f44455f 100644
--- a/modules/role/manifests/caldance.pp
+++ b/modules/role/manifests/caldance.pp
@@ -12,10 +12,12 @@ class role::caldance (
12 Optional[String] $pg_port = "5432", 12 Optional[String] $pg_port = "5432",
13 Optional[String] $caldance_version = undef, 13 Optional[String] $caldance_version = undef,
14 Optional[String] $caldance_sha256 = undef, 14 Optional[String] $caldance_sha256 = undef,
15 Optional[Array] $cron_pip = [],
15) { 16) {
16 $password_seed = lookup("base_installation::puppet_pass_seed") 17 $password_seed = lookup("base_installation::puppet_pass_seed")
17 include "base_installation" 18 include "base_installation"
18 19
20 include "profile::mail"
19 include "profile::tools" 21 include "profile::tools"
20 include "profile::postgresql" 22 include "profile::postgresql"
21 include "profile::apache" 23 include "profile::apache"
@@ -199,4 +201,15 @@ class role::caldance (
199 wsgi_script_aliases => { "/" => "$caldance_app/main_app/wsgi.py" }; 201 wsgi_script_aliases => { "/" => "$caldance_app/main_app/wsgi.py" };
200 default: * => $::profile::apache::apache_vhost_default; 202 default: * => $::profile::apache::apache_vhost_default;
201 } 203 }
204
205 $mailtos = join($cron_pip, ",")
206 cron::job { "list_outdated_pip_packages":
207 ensure => present,
208 user => $user,
209 environment => concat(["HOME=${home}","MAILTO=${mailtos}"], $shell_env),
210 command => "${home}/virtualenv/bin/pip list --outdated",
211 minute => "15",
212 hour => "0",
213 require => Exec["initialize_venv"],
214 }
202} 215}