From 1d006006c253c0c8641d5737ccaf81b4d55c622d Mon Sep 17 00:00:00 2001 From: Yanis Guenane Date: Wed, 22 Jul 2015 16:35:47 +0200 Subject: [PATCH] Add tag to package resource In order to be able to take an action after all the packages of the module have been installed/updated, we set a 'horizon-package' tag for each package of this module. At the moment, there is a generic openstack tag that is not specific enough if one wants to take action upon a single module change. Use case : If an action needs to be taken after all the packages have been installed or updated : Package <| tag == 'horizon-package' |> -> X Change-Id: I24ba2ef192536c01c4336d5f15f0ba9564a32b78 --- manifests/init.pp | 2 +- spec/classes/horizon_init_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index 9e772c4c..01de8811 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -296,7 +296,7 @@ class horizon( package { 'horizon': ensure => $package_ensure, name => $::horizon::params::package_name, - tag => 'openstack', + tag => ['openstack', 'horizon-package'], } concat { $::horizon::params::config_file: diff --git a/spec/classes/horizon_init_spec.rb b/spec/classes/horizon_init_spec.rb index 674fd902..4878535b 100644 --- a/spec/classes/horizon_init_spec.rb +++ b/spec/classes/horizon_init_spec.rb @@ -28,7 +28,7 @@ describe 'horizon' do is_expected.to contain_package('python-lesscpy').with_ensure('present') is_expected.to contain_package('horizon').with( :ensure => 'present', - :tag => 'openstack' + :tag => ['openstack', 'horizon-package'], ) } it { is_expected.to contain_exec('refresh_horizon_django_cache').with({