puppet-glance/manifests/init.pp
Benedikt von St. Vieth 7128d96dde 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
2015-08-13 19:03:37 +02:00

35 lines
837 B
Puppet

# == class: glance
#
# base glance config.
#
# === parameters:
#
# [*package_ensure*]
# (Optional) Ensure state for package. On Ubuntu this setting
# is ignored since Ubuntu has separate API and registry packages.
# Defaults to 'present'
#
class glance(
$package_ensure = 'present'
) {
include ::glance::params
file { '/etc/glance/':
ensure => directory,
owner => 'glance',
group => 'root',
mode => '0770',
}
if ( $glance::params::api_package_name == $glance::params::registry_package_name ) {
package { $glance::params::api_package_name :
ensure => $package_ensure,
name => $::glance::params::package_name,
tag => ['openstack', 'glance-package'],
}
}
ensure_resource('package', 'python-openstackclient', {'ensure' => $package_ensure, tag => 'openstack'})
}