Fix Puppet 2.6 compilation issues.

In Puppet 2.6, negate boolean wasn't handled in resources attribues.
Also hashes values were not accepted in functions. The manifests have
been updated to resolve compilation issues in Puppet 2.6.
This commit is contained in:
Nan Liu 2012-03-18 01:56:13 -05:00
parent 33c72efde1
commit 9ebbbc434d
2 changed files with 7 additions and 2 deletions

View file

@ -64,11 +64,13 @@ define mysql::db (
require => Database_user["${user}@${host}"], require => Database_user["${user}@${host}"],
} }
$refresh = ! $enforce_sql
if $sql { if $sql {
exec{ "${name}-import": exec{ "${name}-import":
command => "/usr/bin/mysql -u ${user} -p${password} -h ${host} ${name} < ${sql}", command => "/usr/bin/mysql -u ${user} -p${password} -h ${host} ${name} < ${sql}",
logoutput => true, logoutput => true,
refreshonly => ! $enforce_sql, refreshonly => $refresh,
require => Database_grant["${user}@${host}/${name}"], require => Database_grant["${user}@${host}/${name}"],
subscribe => Database[$name], subscribe => Database[$name],
} }

View file

@ -24,7 +24,10 @@ class mysql::server (
Class['mysql::server'] -> Class['mysql::config'] Class['mysql::server'] -> Class['mysql::config']
create_resources( 'class', {'mysql::config' => $config_hash} ) $config_class = {}
$config_class['mysql::config'] = $config_hash
create_resources( 'class', $config_class )
package { 'mysql-server': package { 'mysql-server':
name => $package_name, name => $package_name,