2012-04-24 08:41:12 +02:00
|
|
|
class mysql::server::account_security {
|
2013-08-18 02:54:02 +02:00
|
|
|
mysql_user {
|
2015-01-10 17:17:35 +01:00
|
|
|
[ 'root@127.0.0.1',
|
2013-04-11 19:02:41 +02:00
|
|
|
'root@::1',
|
|
|
|
'@localhost',
|
|
|
|
'@%']:
|
2012-04-24 08:41:12 +02:00
|
|
|
ensure => 'absent',
|
2013-09-13 19:04:42 +02:00
|
|
|
require => Anchor['mysql::server::end'],
|
2012-04-24 08:41:12 +02:00
|
|
|
}
|
2015-01-10 17:17:35 +01:00
|
|
|
if ($::fqdn != 'localhost.localdomain') {
|
|
|
|
mysql_user {
|
|
|
|
[ "root@localhost.localdomain",
|
|
|
|
"@localhost.localdomain"]:
|
|
|
|
ensure => 'absent',
|
|
|
|
require => Anchor['mysql::server::end'],
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if ($::fqdn != 'localhost') {
|
|
|
|
mysql_user {
|
|
|
|
[ "root@${::fqdn}",
|
|
|
|
"@${::fqdn}"]:
|
2012-10-29 05:40:11 +01:00
|
|
|
ensure => 'absent',
|
2013-09-13 19:04:42 +02:00
|
|
|
require => Anchor['mysql::server::end'],
|
2012-10-29 05:40:11 +01:00
|
|
|
}
|
|
|
|
}
|
2015-01-10 17:17:35 +01:00
|
|
|
if ($::fqdn != $::hostname) {
|
|
|
|
if ($::hostname != 'localhost') {
|
|
|
|
mysql_user { ["root@${::hostname}", "@${::hostname}"]:
|
|
|
|
ensure => 'absent',
|
|
|
|
require => Anchor['mysql::server::end'],
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2013-08-18 02:54:02 +02:00
|
|
|
mysql_database { 'test':
|
2012-04-24 08:41:12 +02:00
|
|
|
ensure => 'absent',
|
2013-09-13 19:04:42 +02:00
|
|
|
require => Anchor['mysql::server::end'],
|
2012-04-24 08:41:12 +02:00
|
|
|
}
|
|
|
|
}
|