Ori.livneh has uploaded a new change for review.
https://gerrit.wikimedia.org/r/183060
Change subject: redis: Get rid of unused (and unhelpful) module parameters
......................................................................
redis: Get rid of unused (and unhelpful) module parameters
* Get rid of 'package', 'package_version', 'service_name' and 'config_template'
arguments.
* Get rid of OS guards in redis module. The module is WMF-specific and not
likely to be reusable by third parties, so there's no need to assert that the
OS is Ubunutu or Debian.
Change-Id: I4e6a7fbb2b98d8f01d6ad02c4d4a5e631f3af320
---
M modules/redis/manifests/init.pp
1 file changed, 6 insertions(+), 19 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/60/183060/1
diff --git a/modules/redis/manifests/init.pp b/modules/redis/manifests/init.pp
index f40950f..72f8aff 100644
--- a/modules/redis/manifests/init.pp
+++ b/modules/redis/manifests/init.pp
@@ -9,28 +9,16 @@
$redis_options = {},
$rename_commands = {},
$redis_replication = undef,
- $package = 'redis-server',
- $package_version = 'present',
- $servicename = 'redis-server',
$monitor = true,
$password = false,
$auto_aof_rewrite_min_size = '512mb',
- $config_template = 'redis/redis.conf.erb',
$dbfilename = undef, # filename for rdb. If undef, "$hostname-$port.rdb"
is used
$saves = [ "900 1", "300 100", "60 10000" ], # Save points for rdb
$stop_writes_on_bgsave_error = false
) {
- case $::operatingsystem {
- debian, ubuntu: {
- }
- default: {
- fail("Module ${module_name} is not supported on
${::operatingsystem}")
- }
- }
-
package { 'redis':
- ensure => $package_version,
- name => $package,
+ ensure => present,
+ name => 'redis-server',
}
file { $dir:
@@ -42,19 +30,18 @@
}
file { '/etc/redis/redis.conf':
- content => template($config_template),
- mode => '0444',
+ content => template('redis/redis.conf.erb'),
owner => 'root',
group => 'root',
+ mode => '0444',
require => Package['redis'],
}
service { 'redis':
ensure => running,
- name => $servicename,
+ name => 'redis-server',
enable => true,
require => File['/etc/redis/redis.conf'],
- # subscribe => not doing this deliberately
}
if $::lsbdistcodename == 'trusty' {
@@ -69,6 +56,6 @@
}
if $monitor {
- monitoring::service { $servicename: description => "Redis",
check_command => "check_tcp!${port}" }
+ monitoring::service { 'redis-server': description => "Redis",
check_command => "check_tcp!${port}" }
}
}
--
To view, visit https://gerrit.wikimedia.org/r/183060
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I4e6a7fbb2b98d8f01d6ad02c4d4a5e631f3af320
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ori.livneh <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits