puppet: Add redis_password file for Nagios.

This allows the Nagios user to access redis without having full access
to the redis system.  Ideally, this would eventually use a password
that only has statistics read access, but I'm not sure redis supports
that.
This commit is contained in:
Tim Abbott 2016-07-31 20:24:55 -07:00 committed by Tim Abbott
parent 13a36d9af3
commit 1c453fdf2a
2 changed files with 20 additions and 1 deletions

View File

@ -62,4 +62,13 @@ class zulip_ops::app_frontend {
content => template("zulip_ops/supervisor/conf.d/redis_tunnel.conf.template.erb"),
notify => Service["supervisor"],
}
# Need redis_password in its own file for Nagios
file { '/var/lib/nagios/redis_password':
ensure => file,
mode => 600,
owner => "nagios",
group => "nagios",
content => zulipsecret('secrets', 'redis_password', ''),
}
}

View File

@ -1,3 +1,13 @@
class zulip_ops::redis inherits zulip::redis {
class zulip_ops::redis {
include zulip_ops::base
include zulip::redis
# Need redis_password in its own file for Nagios
file { '/var/lib/nagios/redis_password':
ensure => file,
mode => 600,
owner => "nagios",
group => "nagios",
content => "${zulip::redis::redis_password}\n",
}
}