From 01d9e644c9199b1983a974a088a0029e666e5440 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Isma=C3=ABl=20Bouya?= Date: Tue, 9 Apr 2019 17:01:18 +0200 Subject: [PATCH] Add cron mails to list outdated packages in caldance --- modules/role/manifests/caldance.pp | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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 ( 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") include "base_installation" + include "profile::mail" include "profile::tools" include "profile::postgresql" include "profile::apache" @@ -199,4 +201,15 @@ class role::caldance ( 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"], + } } -- 2.41.0