Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #128 from bodepd/fix_account

account security should not fail if hostname == fqdn
  • Loading branch information...
commit af4b8bff0ad59f21211be2a98d31588066c41e0c 2 parents 8327830 + 649bc16
@bodepd bodepd authored
Showing with 8 additions and 2 deletions.
  1. +8 −2 manifests/server/account_security.pp
View
10 manifests/server/account_security.pp
@@ -1,11 +1,17 @@
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', 'root@::1',
- "@${::fqdn}", "@${::hostname}", '@localhost', '@%' ]:
+ database_user { [ "root@${::fqdn}", 'root@127.0.0.1', 'root@::1',
+ "@${::fqdn}", '@localhost', '@%' ]:
ensure => 'absent',
require => Class['mysql::config'],
}
+ if ($::fqdn != $::hostname) {
+ database_user { ["root@${::hostname}", "@${::hostname}"]:
+ ensure => 'absent',
+ require => Class['mysql::config'],
+ }
+ }
database { 'test':
ensure => 'absent',
require => Class['mysql::config'],
Please sign in to comment.
Something went wrong with that request. Please try again.