From 722d68b03644c8d6a832f386deec652132f21c9a Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Thu, 14 Mar 2024 12:31:55 +0900 Subject: [PATCH] Use creates property of exec ... instead of unless + test command, to leverage the built-in feature and simplify the logic in our own modules. Change-Id: I0d5e98fcfcada5637dd0c3cc60e503b73241f3fd --- manifests/storage/loopback.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/storage/loopback.pp b/manifests/storage/loopback.pp index 42496946..f4b2102d 100644 --- a/manifests/storage/loopback.pp +++ b/manifests/storage/loopback.pp @@ -62,7 +62,7 @@ define swift::storage::loopback( exec { "create_partition-${name}": command => "dd if=/dev/zero of=${base_dir}/${name} bs=${byte_size} count=0 seek=${seek}", path => ['/usr/bin/', '/bin'], - unless => "test -f ${base_dir}/${name}", + creates => "${base_dir}/${name}", before => Anchor['swift::config::end'], }