puppet-openstack-integration/manifests/rabbitmq.pp
Emilien Macchi e22fe0ed9b rabbitmq: use $::package_provider fact
Switch package_provider to use $::package_provider fact present in
puppetlabs-stdlib.

It will avoid any collision later.

Change-Id: I2df1bff1b911c22eed8a2f6b9c0ab38edda43156
2016-04-12 19:38:39 -04:00

42 lines
1.5 KiB
Puppet

class openstack_integration::rabbitmq {
include ::openstack_integration::params
include ::openstack_integration::config
if $::openstack_integration::config::ssl {
file { '/etc/rabbitmq/ssl/private':
ensure => directory,
owner => 'root',
mode => '0755',
selinux_ignore_defaults => true,
before => File["/etc/rabbitmq/ssl/private/${::fqdn}.pem"],
}
openstack_integration::ssl_key { 'rabbitmq':
key_path => "/etc/rabbitmq/ssl/private/${::fqdn}.pem",
require => File['/etc/rabbitmq/ssl/private'],
notify => Service['rabbitmq-server'],
}
class { '::rabbitmq':
package_provider => $::package_provider,
delete_guest_user => true,
ssl => true,
ssl_only => true,
ssl_cacert => $::openstack_integration::params::ca_bundle_cert_path,
ssl_cert => $::openstack_integration::params::cert_path,
ssl_key => "/etc/rabbitmq/ssl/private/${::fqdn}.pem",
environment_variables => $::openstack_integration::config::rabbit_env,
}
} else {
class { '::rabbitmq':
package_provider => $::package_provider,
delete_guest_user => true,
environment_variables => $::openstack_integration::config::rabbit_env,
}
}
rabbitmq_vhost { '/':
provider => 'rabbitmqctl',
require => Class['::rabbitmq'],
}
}