Skip to content

Commit

Permalink
account security should not fail if hostname == fqdn
Browse files Browse the repository at this point in the history
This commit checks that hostaname and fqdn are not
equal before trying to remove both.
  • Loading branch information
Dan Bode committed Oct 29, 2012
1 parent 8327830 commit 649bc16
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions manifests/server/account_security.pp
@@ -1,11 +1,17 @@
class mysql::server::account_security { class mysql::server::account_security {
# Some installations have some default users which are not required. # Some installations have some default users which are not required.
# We remove them here. You can subclass this class to overwrite this behavior. # We remove them here. You can subclass this class to overwrite this behavior.
database_user { [ "root@${::fqdn}", "root@${::hostname}", 'root@127.0.0.1', 'root@::1', database_user { [ "root@${::fqdn}", 'root@127.0.0.1', 'root@::1',
"@${::fqdn}", "@${::hostname}", '@localhost', '@%' ]: "@${::fqdn}", '@localhost', '@%' ]:
ensure => 'absent', ensure => 'absent',
require => Class['mysql::config'], require => Class['mysql::config'],
} }
if ($::fqdn != $::hostname) {
database_user { ["root@${::hostname}", "@${::hostname}"]:
ensure => 'absent',
require => Class['mysql::config'],
}
}
database { 'test': database { 'test':
ensure => 'absent', ensure => 'absent',
require => Class['mysql::config'], require => Class['mysql::config'],
Expand Down

0 comments on commit 649bc16

Please sign in to comment.