Skip to content

Commit

Permalink
Merge pull request #754 from mhaskel/ff_to_master
Browse files Browse the repository at this point in the history
Fast-forward 3.6.x to master
  • Loading branch information
hunner committed Aug 31, 2015
2 parents afc1567 + d6bdd4c commit daa4b62
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 7 deletions.
2 changes: 1 addition & 1 deletion manifests/server/backup.pp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
) {

if $prescript and $provider =~ /(mysqldump|mysqlbackup)/ {
warn("The \$prescript option is not currently implemented for the ${provider} backup provider.")
warning("The \$prescript option is not currently implemented for the ${provider} backup provider.")
}

create_resources('class', {
Expand Down
29 changes: 25 additions & 4 deletions manifests/server/mysqltuner.pp
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,35 @@
}

if $ensure == 'present' {
class { 'staging': }
# $::puppetversion doesn't exist in puppet 4.x so would break strict
# variables
if ! $::settings::strict_variables {
$_puppetversion = $::puppetversion
} else {
# defined only works with puppet >= 3.5.0, so don't use it unless we're
# actually using strict variables
$_puppetversion = defined('$puppetversion') ? {
true => $::puppetversion,
default => undef,
}
}
# see https://tickets.puppetlabs.com/browse/ENTERPRISE-258
if $_puppetversion and $_puppetversion =~ /Puppet Enterprise/ and versioncmp($_puppetversion, '3.8.0') < 0 {
class { 'staging':
path => '/opt/mysql_staging',
}
} else {
class { 'staging': }
}

staging::file { "mysqltuner-${_version}":
source => $_source,
}
file { '/usr/local/bin/mysqltuner':
ensure => $ensure,
mode => '0550',
source => "${::staging::path}/mysql/mysqltuner-${_version}",
ensure => $ensure,
mode => '0550',
source => "${::staging::path}/mysql/mysqltuner-${_version}",
require => Staging::File["mysqltuner-${_version}"],
}
} else {
file { '/usr/local/bin/mysqltuner':
Expand Down
4 changes: 2 additions & 2 deletions metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
"requirements": [
{
"name": "pe",
"version_requirement": ">= 3.7.0 < 2015.3.0"
"version_requirement": ">= 3.0.0 < 2015.3.0"
},
{
"name": "puppet",
Expand All @@ -84,6 +84,6 @@
"description": "Mysql module",
"dependencies": [
{"name":"puppetlabs/stdlib","version_requirement":">= 3.2.0 < 5.0.0"},
{"name":"nanliu/staging","version_requirement":"1.x"}
{"name":"nanliu/staging","version_requirement":">= 1.0.1 < 2.0.0"}
]
}

0 comments on commit daa4b62

Please sign in to comment.