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
This commit is contained in:
@@ -62,7 +62,7 @@ define swift::storage::loopback(
|
|||||||
exec { "create_partition-${name}":
|
exec { "create_partition-${name}":
|
||||||
command => "dd if=/dev/zero of=${base_dir}/${name} bs=${byte_size} count=0 seek=${seek}",
|
command => "dd if=/dev/zero of=${base_dir}/${name} bs=${byte_size} count=0 seek=${seek}",
|
||||||
path => ['/usr/bin/', '/bin'],
|
path => ['/usr/bin/', '/bin'],
|
||||||
unless => "test -f ${base_dir}/${name}",
|
creates => "${base_dir}/${name}",
|
||||||
before => Anchor['swift::config::end'],
|
before => Anchor['swift::config::end'],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user