From 1c051a1e2b8e284a16c1a39d89b50847e37696d2 Mon Sep 17 00:00:00 2001 From: Ossi Salmi Date: Fri, 15 Apr 2011 15:44:52 +0300 Subject: [PATCH] Replaced some exec tests with creates parameter --- python/manifests/init.pp | 2 +- svn/manifests/init.pp | 2 +- user/scripts/update-virtual.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/python/manifests/init.pp b/python/manifests/init.pp index 649f1b2..37fe4ab 100644 --- a/python/manifests/init.pp +++ b/python/manifests/init.pp @@ -17,7 +17,7 @@ define python::setup::install($python="python") { path => "/bin:/usr/bin:/sbin:/usr/sbin", cwd => "${name}", command => "${python} setup.py install", - unless => "test -d build", + creates => "${name}/build", } } diff --git a/svn/manifests/init.pp b/svn/manifests/init.pp index e501252..5497ca6 100644 --- a/svn/manifests/init.pp +++ b/svn/manifests/init.pp @@ -41,7 +41,7 @@ define svn::checkout($source, $ensure="HEAD") { exec { "svn-co-${name}": path => "/bin:/usr/bin:/sbin:/usr/sbin", command => "svn checkout --non-interactive -r ${ensure} ${source} ${name}", - unless => "test -d ${name}", + creates => "${name}", require => [ Package["subversion"], File["/etc/subversion/servers"], ], } diff --git a/user/scripts/update-virtual.rb b/user/scripts/update-virtual.rb index 990f8d5..ed8a400 100755 --- a/user/scripts/update-virtual.rb +++ b/user/scripts/update-virtual.rb @@ -71,7 +71,7 @@ class user::virtual { command => "umask 077; mkdir -p ${home} && tar cf - . | tar xf - -C ${home} && chown -R ${uid}:${gid} ${home}", cwd => "/etc/skel", path => "/sbin:/usr/sbin:/bin:/usr/bin", - unless => "test -d ${home}", + creates => "${home}", refreshonly => true, }