puppet-nova/manifests/rabbitmq.pp
Dan Bode 93d06fc061 Remove apt setup from nove::rabbitmq
Previously, it was possible to specify a parameter
to indicate that you wished to setup repos to use
the latest version of rabbitmq.

It makes more sense to expect the user to update
their own repos.

This commit removes that logic.
2012-04-01 14:42:43 -07:00

49 lines
1.2 KiB
Puppet

#
# class for installing rabbitmq server for nova
#
#
class nova::rabbitmq(
$userid='guest',
$password='guest',
$port='5672',
$virtual_host='/'
) {
# only configure nova after the queue is up
Class['rabbitmq::service'] -> Anchor<| title == 'nova-start' |>
# work around hostname bug, LP #653405
# TODO - see if this is still required
host { $hostname:
ip => $ipaddress,
host_aliases => $fqdn,
}
if $userid == 'guest' {
$delete_guest_user = false
} else {
$delete_guest_user = true
rabbitmq_user { $userid:
admin => true,
password => $password,
provider => 'rabbitmqctl',
require => Class['rabbitmq::server'],
}
# I need to figure out the appropriate permissions
rabbitmq_user_permissions { "${userid}@${virtual_host}":
configure_permission => '.*',
write_permission => '.*',
read_permission => '.*',
provider => 'rabbitmqctl',
}->Anchor<| title == 'nova-start' |>
}
class { 'rabbitmq::server':
port => $port,
delete_guest_user => $delete_guest_user,
}
rabbitmq_vhost { $virtual_host:
provider => 'rabbitmqctl',
require => Class['rabbitmq::server'],
}
}