From 71cc8f97a462e5ab8a63d199a7a9b0ef6472c38e Mon Sep 17 00:00:00 2001 From: Jeremy Stanley Date: Wed, 16 May 2018 22:11:03 +0000 Subject: [PATCH] Unpack webclient into dist subdir The old webclient tarballs had content in a "dist" subdirectory, but newer ones do not. So as to avoid webroot contamination as well as to make sure we copy the correct new content into place, unpack the tarballs into an empty "dist" subdirectory of the download staging directory. Change-Id: I15d1e00c9a0aa752b21b6eeedb29bcd89dc03935 --- manifests/application.pp | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/manifests/application.pp b/manifests/application.pp index 945f16c..79bd333 100644 --- a/manifests/application.pp +++ b/manifests/application.pp @@ -217,13 +217,25 @@ class storyboard::application ( onlyif => "curl -I ${webclient_url} -z ./${webclient_filename} | grep '200 OK'", } + # Create/clean 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 exec { 'unpack-webclient': - command => "tar -xzf ./${webclient_filename}", + command => "tar -xzf ../${webclient_filename}", path => '/bin:/usr/bin', refreshonly => true, - cwd => $src_root_webclient, - require => Exec['get-webclient'], + cwd => "${src_root_webclient}/dist", + require => [ + File["${src_root_webclient}/dist"], + Exec['get-webclient'], + ], subscribe => Exec['get-webclient'], }