2016-03-01 13:38:07 -05:00
|
|
|
class openstack_integration::rabbitmq {
|
2016-02-26 19:13:28 -05:00
|
|
|
|
2019-12-08 12:59:28 +01:00
|
|
|
include openstack_integration::params
|
|
|
|
include openstack_integration::config
|
2015-11-06 14:43:25 -05:00
|
|
|
|
2016-03-01 13:38:07 -05:00
|
|
|
if $::openstack_integration::config::ssl {
|
2016-02-26 19:13:28 -05:00
|
|
|
file { '/etc/rabbitmq/ssl/private':
|
|
|
|
ensure => directory,
|
|
|
|
owner => 'root',
|
|
|
|
mode => '0755',
|
|
|
|
selinux_ignore_defaults => true,
|
2023-03-01 10:29:37 +09:00
|
|
|
before => File["/etc/rabbitmq/ssl/private/${facts['networking']['fqdn']}.pem"],
|
2016-02-26 19:13:28 -05:00
|
|
|
}
|
|
|
|
openstack_integration::ssl_key { 'rabbitmq':
|
2023-03-01 10:29:37 +09:00
|
|
|
key_path => "/etc/rabbitmq/ssl/private/${facts['networking']['fqdn']}.pem",
|
2016-03-01 18:50:40 -05:00
|
|
|
require => File['/etc/rabbitmq/ssl/private'],
|
2016-02-26 19:13:28 -05:00
|
|
|
notify => Service['rabbitmq-server'],
|
|
|
|
}
|
2023-03-07 23:29:47 +09:00
|
|
|
}
|
|
|
|
|
|
|
|
class { 'rabbitmq':
|
|
|
|
package_provider => $facts['package_provider'],
|
|
|
|
delete_guest_user => true,
|
|
|
|
ssl => $::openstack_integration::config::ssl,
|
|
|
|
ssl_only => $::openstack_integration::config::ssl,
|
|
|
|
# the parameters below are ignored when ssl is false
|
|
|
|
ssl_cacert => $::openstack_integration::params::ca_bundle_cert_path,
|
|
|
|
ssl_cert => $::openstack_integration::params::cert_path,
|
|
|
|
ssl_key => "/etc/rabbitmq/ssl/private/${facts['networking']['fqdn']}.pem",
|
|
|
|
environment_variables => {
|
2023-03-19 16:42:36 +09:00
|
|
|
'LC_ALL' => 'en_US.UTF-8',
|
|
|
|
'HOSTNAME' => $::openstack_integration::config::hostname,
|
|
|
|
'RABBITMQ_NODENAME' => "rabbit@${::openstack_integration::config::hostname}"
|
2023-03-07 23:29:47 +09:00
|
|
|
},
|
|
|
|
repos_ensure => false,
|
|
|
|
manage_python => false,
|
|
|
|
# the interface parameter is ignored if ssl_only is true
|
|
|
|
interface => $::openstack_integration::config::host,
|
|
|
|
# the ssl_interface parameter is ignored if ssl is false
|
|
|
|
ssl_interface => $::openstack_integration::config::host,
|
|
|
|
node_ip_address => $::openstack_integration::config::host,
|
|
|
|
management_ip_address => $::openstack_integration::config::host,
|
|
|
|
ipv6 => $::openstack_integration::config::ipv6,
|
2015-11-06 14:43:25 -05:00
|
|
|
}
|
|
|
|
rabbitmq_vhost { '/':
|
|
|
|
provider => 'rabbitmqctl',
|
2019-12-08 12:59:28 +01:00
|
|
|
require => Class['rabbitmq'],
|
2015-11-06 14:43:25 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|