puppet-openstack-integration/manifests/rabbitmq.pp
Emilien Macchi c3d8e680a4 Align the stars to bring our CI back alive
This patch squash 2 commits to bring our CI back:

1) Pin Tempest to latest working commit:

https://review.openstack.org/#/c/297511/ broke us, we need to pin
Tempest to keep rolling.
This will be reverted once we sort things out.

2) rabbitmq: install packages from distro repos

Stop installing RabbitMQ from rabbitmq.com repository.

rabbitmq.com is providing a terrible and frustrating experience of
packaging repository:
* rabbitmq.com is very often down and we have to recheck our jobs
  everytime it happens.
* packaging signature is currently broken, see [1].

From this patch, we'll deploy RabbitMQ using distro repositories.

[1] https://github.com/puppetlabs/puppetlabs-rabbitmq/pull/476

Change-Id: I1e79c04d7cd796493ae56423b70626e8841cf284
2016-05-25 14:09:45 -04:00

43 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,
repos_ensure => false,
}
} 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'],
}
}