Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

puppet: Remove zuli-redis.conf workaround from Zulip 2.0.0.

Alex Vandiver874f5f84413b
diff --git a/puppet/zulip/manifests/profile/redis.pp b/puppet/zulip/manifests/profile/redis.pp
index 700fdcd0668..dd17937f887 100644
--- a/puppet/zulip/manifests/profile/redis.pp
+++ b/puppet/zulip/manifests/profile/redis.pp
@@ -26,34 +26,16 @@ class zulip::profile::redis {
unless => "/bin/grep -Fxqe '${line}' '${file}'",
path => '/bin',
command => "bash -c \"(/bin/echo; /bin/echo '# Include Zulip-specific configuration'; /bin/echo '${line}') >> '${file}'\"",
- require => [Package[$redis],
- File[$zulip_redisconf],
- Exec['rediscleanup-zuli-redis']],
- }
-
- # Fix the typo in the path to $zulip_redisconf introduced in
- # 071e32985c1207f20043e1cf28f82300d9f23f31 without triggering a
- # redis restart.
- $legacy_wrong_filename = "${redis_dir}/zuli-redis.conf"
- exec { 'rediscleanup-zuli-redis':
- onlyif => "test -e ${legacy_wrong_filename}",
- command => "
- mv ${legacy_wrong_filename} ${zulip_redisconf}
- perl -0777 -pe '
- if (m|^\\Q${line}\\E\$|m) {
- s|^\\n?(:?# Include Zulip-specific configuration\\n)?include \\Q${legacy_wrong_filename}\\E\\n||m;
- } else {
- s|^include \\Q${legacy_wrong_filename}\\E\$|${line}|m;
- }
- ' -i /etc/redis/redis.conf
- ",
- provider => shell,
+ require => [
+ Package[$redis],
+ File[$zulip_redisconf],
+ ],
}
$redis_password = zulipsecret('secrets', 'redis_password', '')
file { $zulip_redisconf:
ensure => file,
- require => [Package[$redis], Exec['rediscleanup-zuli-redis']],
+ require => Package[$redis],
owner => 'redis',
group => 'redis',
mode => '0640',