7890f79547
Secures the MySQL installation by removing the test database and the default users that are created during the MySQL first-run (root@${fqdn}, @%, @localhost, etc.). Includes rspec tests and updated documentation.
13 lines
503 B
Puppet
13 lines
503 B
Puppet
class mysql::server::account_security {
|
|
# Some installations have some default users which are not required.
|
|
# We remove them here. You can subclass this class to overwrite this behavior.
|
|
database_user { [ "root@${::fqdn}", "root@${::hostname}", 'root@127.0.0.1',
|
|
"@${::fqdn}", "@${::hostname}", '@localhost', '@%' ]:
|
|
ensure => 'absent',
|
|
require => Class['mysql::config'],
|
|
}
|
|
database { 'test':
|
|
ensure => 'absent',
|
|
require => Class['mysql::config'],
|
|
}
|
|
}
|