mirror of
https://github.com/zulip/zulip.git
synced 2025-10-27 01:53:59 +00:00
puppet: Install procps, for pgrep.
In puppet, we use pgrep in the collection stage, to see if rabbitmq is running. Sufficiently bare-bones systems will not have `procps` (which provides `pgrep`) installed yet, which makes the install abort when running `puppet` for the first time. Just installing the `procps` package in Puppet is insufficient, because the check in the `unless` block runs when Puppet is determining which resources it needs to instantiate, and in what order; any package installation has yet to happen. As `erlang-base` (which provides `epmd`) happens to have a dependency of `procps`, any system without `pgrep` will also not have `epmd` installed or running. Regardless, it is safe to run `epmd -daemon` even if one is already running, as the comment above notes.
This commit is contained in:
committed by
Tim Abbott
parent
3577c6dbd4
commit
ddb9d16132
@@ -45,6 +45,7 @@ class zulip::profile::base {
|
||||
'curl',
|
||||
'wget',
|
||||
'jq',
|
||||
'procps',
|
||||
# Used to read /etc/zulip/zulip.conf for `zulipconf` Puppet function
|
||||
'crudini',
|
||||
# Accurate time is essential
|
||||
|
||||
@@ -59,7 +59,7 @@ class zulip::profile::rabbitmq {
|
||||
# running and exits if so.
|
||||
exec { 'epmd':
|
||||
command => 'epmd -daemon',
|
||||
unless => 'pgrep -f [e]pmd >/dev/null',
|
||||
unless => 'which pgrep && pgrep -f [e]pmd >/dev/null',
|
||||
require => Package[$erlang],
|
||||
path => '/usr/bin/:/bin/',
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user