From bc599f01189823e9e69a31a0e95ff8ba2c8a15a7 Mon Sep 17 00:00:00 2001 From: Jeremy Stanley Date: Fri, 5 Aug 2016 16:01:07 +0000 Subject: [PATCH] Ensure git cronjob absent for correct user When removing a cron resource by setting it absent, it must continue to specify the user if it wasn't root (the default) since crontabs are per-user files. Change-Id: Id68051821b0cca8bbf3e90446f5d915ac9d32be4 --- manifests/cron.pp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/manifests/cron.pp b/manifests/cron.pp index 8dfea22..9bf7615 100644 --- a/manifests/cron.pp +++ b/manifests/cron.pp @@ -14,7 +14,8 @@ class gerrit::cron ( } cron { 'gerrit_repack': - ensure => absent, + ensure => absent, + user => 'gerrit2', } cron { 'optimize_git_repo': user => 'gerrit2', @@ -28,7 +29,8 @@ class gerrit::cron ( # if local replication is enabled, optimize this mirror as well if $replicate_local { cron { 'mirror_repack_local': - ensure => absent, + ensure => absent, + user => 'gerrit2', } cron { 'optimize_git_repo_local_replication': user => 'gerrit2',