diff --git a/modules/openstackid/files/functions b/modules/openstackid/files/functions index 4a5b22a3a2..a185d783ef 100644 --- a/modules/openstackid/files/functions +++ b/modules/openstackid/files/functions @@ -140,6 +140,10 @@ function site_update() { target_dir="$SITE_ROOT/$TARGET_SLOT" rm -rf $target_dir mkdir $target_dir + # fetch catalog and write actual version + fetch_catalog + RELEASE_VERSION=`catalog_get_version` + echo $RELEASE_VERSION > $target_dir/release # fetch and extract release tarball umask 0027 if [[ $SOURCE_TARBALL == http* ]]; then diff --git a/modules/openstackid/manifests/init.pp b/modules/openstackid/manifests/init.pp index f6eae99cf2..09beb88539 100644 --- a/modules/openstackid/manifests/init.pp +++ b/modules/openstackid/manifests/init.pp @@ -214,4 +214,19 @@ class openstackid ( Package[$php5_packages] ], } + exec { 'update-site': + path => '/usr/bin:/bin:/usr/local/bin', + command => '/opt/deploy/deploy.sh update openstackid', + onlyif => '/opt/deploy/deploy.sh status openstackid | grep UPDATE', + logoutput => on_failure, + require => [ + File['/opt/deploy/conf.d/openstackid.conf'], + Apache::Vhost[$vhost_name], + File['/etc/openstackid/recaptcha.php'], + File['/etc/openstackid/database.php'], + File['/etc/openstackid/log.php'], + File['/etc/openstackid/environment.php'], + Package[$php5_packages] ], + } + }