Clean the webclient unpack dir safely.
Don't rely on a puppet file resource to purge the unpack dir as this will trigger on every puppet run then copy the empty unpack dir to the deployment dir. Instead we call rm prior to tar during the unpack exec so that we only ever clean the dir if we are unpacking. Change-Id: I80b4faf54220d88e610e2a224dea47af4133e225
This commit is contained in:
parent
71cc8f97a4
commit
f36b4dce39
@ -217,19 +217,17 @@ class storyboard::application (
|
||||
onlyif => "curl -I ${webclient_url} -z ./${webclient_filename} | grep '200 OK'",
|
||||
}
|
||||
|
||||
# Create/clean the storyboard-webclient unpack directory
|
||||
# Create the storyboard-webclient unpack directory
|
||||
file { "${src_root_webclient}/dist":
|
||||
ensure => directory,
|
||||
recurse => true,
|
||||
purge => true,
|
||||
force => true,
|
||||
require => File[$src_root_webclient],
|
||||
}
|
||||
|
||||
# Unpack storyboard-webclient
|
||||
# Clean the unpack dir then unpack storyboard-webclient
|
||||
exec { 'unpack-webclient':
|
||||
command => "tar -xzf ../${webclient_filename}",
|
||||
command => "rm -rf * && tar -xzf ../${webclient_filename}",
|
||||
path => '/bin:/usr/bin',
|
||||
provider => shell,
|
||||
refreshonly => true,
|
||||
cwd => "${src_root_webclient}/dist",
|
||||
require => [
|
||||
|
Loading…
Reference in New Issue
Block a user