2834498e4d
When defining the mysql::db as exported resources, there are chances that the same resource names are defined across the site, which will cause puppet agent fail. By adding an optional dbname parameter, default to the $name, it allows the resouce name to be defined differently, e.g. ${dbname}_${domain}. Also updated test and docs for dbname parameter and add acceptance test for dbname parameter feature
17 lines
391 B
Puppet
17 lines
391 B
Puppet
class { 'mysql::server':
|
|
config_hash => {'root_password' => 'password'}
|
|
}
|
|
mysql::db { 'mydb':
|
|
user => 'myuser',
|
|
password => 'mypass',
|
|
host => 'localhost',
|
|
grant => ['SELECT', 'UPDATE'],
|
|
}
|
|
mysql::db { "mydb_${fqdn}":
|
|
user => 'myuser',
|
|
password => 'mypass',
|
|
dbname => 'mydb',
|
|
host => ${fqdn},
|
|
grant => ['SELECT', 'UPDATE'],
|
|
tag => $domain,
|
|
}
|