mirror of https://github.com/zulip/zulip.git
kandra: rabbitmqctl may not exist when applying the initial catalog.
puppet hard-fails if it can't find the binary to run in `$PATH`, so we need to make the `unless` short-circuit to false if puppet itself is not installed yet (as during initial installation).
This commit is contained in:
parent
5bcb4e55d8
commit
f9805c9e1f
|
@ -12,7 +12,11 @@ class kandra::prometheus::rabbitmq {
|
|||
}
|
||||
exec { 'enable rabbitmq-prometheus-per-metric':
|
||||
command => "rabbitmqctl eval 'application:set_env(rabbitmq_prometheus, return_per_object_metrics, true).'",
|
||||
unless => "rabbitmqctl eval 'application:get_env(rabbitmq_prometheus, return_per_object_metrics).' | grep -q true",
|
||||
unless => @("EOT"),
|
||||
[ -f /usr/sbin/rabbitmqctl ] &&
|
||||
/usr/sbin/rabbitmqctl eval 'application:get_env(rabbitmq_prometheus, return_per_object_metrics).' \
|
||||
| grep -q true
|
||||
| EOT
|
||||
require => Exec['enable rabbitmq-prometheus'],
|
||||
}
|
||||
kandra::firewall_allow { 'rabbitmq': port => '15692' }
|
||||
|
|
Loading…
Reference in New Issue