e4d5671e7f
This work adds a new mysql::globals class which contains a hash used to build my.cnf from. It's used to share this data across multiple classes so that the client and server can share this data. End users can modify content in my.cnf by including mysql::globals and passing in override_options as a hash that looks like: override_options = { 'mysqld' => { 'max_connections' => '120' } } This completely replaces the mess of parameters that existed in the main mysql class before. Completely refactor mysql::server and rework the API. This changes ordering, changes from execs{} to mysql_user for the root password, removes some functionality (like the etc_root_password), and generally makes some tough decisions about how mysql::server should be built.
22 lines
526 B
Puppet
22 lines
526 B
Puppet
class mysql::server::account_security {
|
|
mysql_user {
|
|
[ "root@${::fqdn}",
|
|
'root@127.0.0.1',
|
|
'root@::1',
|
|
"@${::fqdn}",
|
|
'@localhost',
|
|
'@%']:
|
|
ensure => 'absent',
|
|
require => Anchor['mysql::server::end'],
|
|
}
|
|
if ($::fqdn != $::hostname) {
|
|
mysql_user { ["root@${::hostname}", "@${::hostname}"]:
|
|
ensure => 'absent',
|
|
require => Anchor['mysql::server::end'],
|
|
}
|
|
}
|
|
mysql_database { 'test':
|
|
ensure => 'absent',
|
|
require => Anchor['mysql::server::end'],
|
|
}
|
|
}
|