From 722ab9d926cf3208c7e9b218a1061d9fe805b9c4 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Tue, 24 Jul 2012 17:55:01 -0500 Subject: [PATCH] Pull in cron, not in puppet. We were pulling new changes in the puppet run, and doing planet as a separate cron job. How about we just let the cron job run planet and let puppet install planet. Change-Id: I68d90fd939f184d5f8bd30f4e0f95ccc7a777048 --- manifests/site.pp | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/manifests/site.pp b/manifests/site.pp index 98da016..5f76c0c 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -14,15 +14,6 @@ define planet::site($git_url) { require => Package[nginx], } -# if we already have the mercurial repo the pull updates - - exec { "update_${name}_planet": - command => "git pull --ff-only", - cwd => "/var/lib/planet/${name}", - path => "/bin:/usr/bin", - onlyif => "test -d /var/lib/planet/${name}" - } - # otherwise get a new clone of it exec { "create_${name}_planet": @@ -34,7 +25,7 @@ define planet::site($git_url) { cron { "update_planet_${name}": user => root, minute => "*/5", - command => "date >> /var/log/planet/${name}.log && cd /var/lib/planet/${name} && planet /var/lib/planet/${name}/planet.ini >> /var/log/planet/${name}.log 2>&1" + command => "date >> /var/log/planet/${name}.log && cd /var/lib/planet/${name} && git pull -q --ff-only && planet /var/lib/planet/${name}/planet.ini >> /var/log/planet/${name}.log 2>&1" } }