Jcrespo has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/363840 )
Change subject: Fix service for hosts with a default package (fwup.
f13be9f5a2949f)
......................................................................
Fix service for hosts with a default package (fwup. f13be9f5a2949f)
$package probably should be defined on the role everywhere, for
now we will allow to not set a default, and default to sane
options.
This fixes previous deployment of f13be9f5a2949f, which failed due
to not being able to create local variables on puppet with the
same name than a parameter.
Bug: T169514
Change-Id: I0ee40fa099446eee59a2255631a04ff8337e3309
---
M modules/mariadb/manifests/service.pp
1 file changed, 8 insertions(+), 4 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/40/363840/1
diff --git a/modules/mariadb/manifests/service.pp
b/modules/mariadb/manifests/service.pp
index 6247a22..20d3971 100644
--- a/modules/mariadb/manifests/service.pp
+++ b/modules/mariadb/manifests/service.pp
@@ -32,9 +32,11 @@
if os_version('debian >= stretch') {
# On stretch+, default to MariaDB 10.1
if $package == 'undefined' {
- $package = 'wmf-mariadb101'
+ $installed_package = 'wmf-mariadb101'
+ } else {
+ $installed_package = $package;
}
- case $package {
+ case $installed_package {
'wmf-mysql57', 'wmf-mysql80': { $vendor = 'mysql' }
default: { $vendor = 'mariadb' }
}
@@ -80,7 +82,9 @@
} else {
# Before stretch, default to MariaDB 10.0
if $package == 'undefined' {
- $package = 'wmf-mariadb10'
+ $installed_package = 'wmf-mariadb10'
+ } else {
+ $installed_package = $package;
}
file { "${initd_basedir}/service":
@@ -89,7 +93,7 @@
group => 'root',
mode => '0755',
content => template('mariadb/mariadb.server.erb'),
- require => Package[$package],
+ require => Package[$installed_package],
}
file { '/etc/init.d/mysql':
--
To view, visit https://gerrit.wikimedia.org/r/363840
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I0ee40fa099446eee59a2255631a04ff8337e3309
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Jcrespo <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits