From 3d9839bfa4bf39cfef4e81697df35196001049e1 Mon Sep 17 00:00:00 2001 From: Colleen Murphy Date: Wed, 11 Jul 2018 22:58:07 +0200 Subject: [PATCH] Fix exec idempotency The install-reviewday-dependencies exec doesn't need to be executed on every puppet run, only when the source repo is updated, so add a refreshonly => true to ensure it only reacts to changes in the source repository. Change-Id: Id3a747e49416398e3fdde9aeb843370890dbe572 --- manifests/site.pp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/manifests/site.pp b/manifests/site.pp index 400a327..e898813 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -83,10 +83,11 @@ define reviewday::site( } exec { 'install-reviewday-dependencies': - command => 'pip install -r /var/lib/reviewday/reviewday/requirements.txt', - path => '/usr/local/bin/:/bin/', - subscribe => Vcsrepo['/var/lib/reviewday/reviewday'], - require => Class['pip'], + command => 'pip install -r /var/lib/reviewday/reviewday/requirements.txt', + path => '/usr/local/bin/:/bin/', + subscribe => Vcsrepo['/var/lib/reviewday/reviewday'], + refreshonly => true, + require => Class['pip'], } file { $httproot: