File tree 2 files changed +27
-6
lines changed
2 files changed +27
-6
lines changed Original file line number Diff line number Diff line change 14
14
}
15
15
16
16
if $ensure == ' present' {
17
- class { 'staging' : }
17
+ # $::puppetversion doesn't exist in puppet 4.x so would break strict
18
+ # variables
19
+ if ! $::settings::strict_variables {
20
+ $_puppetversion = $::puppetversion
21
+ } else {
22
+ # defined only works with puppet >= 3.5.0, so don't use it unless we're
23
+ # actually using strict variables
24
+ $_puppetversion = defined (' $puppetversion' ) ? {
25
+ true => $::puppetversion ,
26
+ default => undef ,
27
+ }
28
+ }
29
+ # see https://tickets.puppetlabs.com/browse/ENTERPRISE-258
30
+ if $_puppetversion and $_puppetversion =~ /Puppet Enterprise/ and versioncmp($_puppetversion, ' 3.8.0' ) < 0 {
31
+ class { 'staging' :
32
+ path => ' /opt/mysql_staging' ,
33
+ }
34
+ } else {
35
+ class { 'staging' : }
36
+ }
37
+
18
38
staging::file { "mysqltuner-${_version}" :
19
39
source => $_source,
20
40
}
21
41
file { '/usr/local/bin/mysqltuner' :
22
- ensure => $ensure ,
23
- mode => ' 0550' ,
24
- source => " ${::staging::path} /mysql/mysqltuner-${_version}" ,
42
+ ensure => $ensure ,
43
+ mode => ' 0550' ,
44
+ source => " ${::staging::path} /mysql/mysqltuner-${_version}" ,
45
+ require => Staging::File [" mysqltuner-${_version}" ],
25
46
}
26
47
} else {
27
48
file { '/usr/local/bin/mysqltuner' :
Original file line number Diff line number Diff line change 74
74
"requirements" : [
75
75
{
76
76
"name" : " pe" ,
77
- "version_requirement" : " >= 3.7 .0 < 2015.3.0"
77
+ "version_requirement" : " >= 3.0 .0 < 2015.3.0"
78
78
},
79
79
{
80
80
"name" : " puppet" ,
84
84
"description" : " Mysql module" ,
85
85
"dependencies" : [
86
86
{"name" :" puppetlabs/stdlib" ,"version_requirement" :" >= 3.2.0 < 5.0.0" },
87
- {"name" :" nanliu/staging" ,"version_requirement" :" 1.x " }
87
+ {"name" :" nanliu/staging" ,"version_requirement" :" >= 1.0.1 < 2.0.0 " }
88
88
]
89
89
}
You can’t perform that action at this time.
0 commit comments