puppet: Ensure rabbitmq-server and epmd services are running.

[tabbott@mit.edu: Added a few comments]
This commit is contained in:
Guillaume Simon 2015-09-30 09:17:08 -07:00 committed by Tim Abbott
parent f819c1e901
commit 956fd7c420
1 changed files with 17 additions and 0 deletions

View File

@ -1,5 +1,6 @@
class zulip::rabbit {
$rabbit_packages = [# Needed to run rabbitmq
"erlang-base",
"rabbitmq-server",
]
package { $rabbit_packages: ensure => "installed" }
@ -39,5 +40,21 @@ class zulip::rabbit {
source => "puppet:///modules/zulip/rabbitmq/rabbitmq.config",
}
# epmd doesn't have an init script. This won't leak epmd processes
# because epmd checks if one is already running and exits if so.
#
# TODO: Ideally we'd still check if it's already running to keep the
# puppet log for what is being changed clean
exec { "epmd":
command => "epmd -daemon",
require => Package[erlang-base],
path => "/usr/bin/:/bin/",
}
service { "rabbitmq-server":
ensure => running,
require => Exec["epmd"],
}
# TODO: Should also call exactly once "configure-rabbitmq"
}