From 7128d96ddea449596f345dd7222b055417e70f3a Mon Sep 17 00:00:00 2001 From: "Benedikt von St. Vieth" Date: Wed, 12 Aug 2015 08:21:31 +0200 Subject: [PATCH] solve duplicate declaration issue for python-openstackclient when having a controller node with several modules that use puppet-openstacklib the package python-openstackclient is already declared. because openstacklib adds the tag 'openstack' to the resource, we have to do it here to. otherwise ensure_resource does not recognize it and we have a duplicate declaration for the package. Change-Id: Icf341ea92764f2ddb60b0e7ace09a56febe59545 Closes-Bug: #1483663 --- manifests/init.pp | 2 +- spec/classes/glance_spec.rb | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index b9afadfc..0efc8811 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -30,5 +30,5 @@ class glance( } } - ensure_resource('package', 'python-openstackclient', {'ensure' => $package_ensure}) + ensure_resource('package', 'python-openstackclient', {'ensure' => $package_ensure, tag => 'openstack'}) } diff --git a/spec/classes/glance_spec.rb b/spec/classes/glance_spec.rb index 06c93dad..cf863e93 100644 --- a/spec/classes/glance_spec.rb +++ b/spec/classes/glance_spec.rb @@ -31,7 +31,9 @@ describe 'glance' do 'mode' => '0770' )} - it { is_expected.to contain_package('python-openstackclient') } + it { is_expected.to contain_package('python-openstackclient').with( + :tag => 'openstack' + )} end end