Mercurial > repos > other > Puppet
comparison modules/mysql/manifests/server/account_security.pp @ 389:668df4711671
Update MySQL modules
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Mon, 03 Jan 2022 17:16:21 +0000 |
parents | 48d3a1948e4d |
children | c6c9a2cfcfbd |
comparison
equal
deleted
inserted
replaced
388:750d36241580 | 389:668df4711671 |
---|---|
3 # | 3 # |
4 # @api private | 4 # @api private |
5 # | 5 # |
6 class mysql::server::account_security { | 6 class mysql::server::account_security { |
7 mysql_user { | 7 mysql_user { |
8 [ 'root@127.0.0.1', | 8 ['root@127.0.0.1', |
9 'root@::1', | 9 'root@::1', |
10 '@localhost', | 10 '@localhost', |
11 '@%']: | 11 '@%']: |
12 ensure => 'absent', | 12 ensure => 'absent', |
13 require => Anchor['mysql::server::end'], | 13 require => Anchor['mysql::server::end'], |
14 } | 14 } |
15 if ($::fqdn != 'localhost.localdomain') { | 15 if ($::fqdn != 'localhost.localdomain') { |
16 mysql_user { | 16 mysql_user { |
17 [ 'root@localhost.localdomain', | 17 ['root@localhost.localdomain', |
18 '@localhost.localdomain']: | 18 '@localhost.localdomain']: |
19 ensure => 'absent', | 19 ensure => 'absent', |
20 require => Anchor['mysql::server::end'], | 20 require => Anchor['mysql::server::end'], |
21 } | 21 } |
22 } | 22 } |
23 if ($::fqdn and $::fqdn != 'localhost') { | 23 if ($::fqdn and $::fqdn != 'localhost') { |
24 mysql_user { | 24 mysql_user { |
25 [ "root@${::fqdn}", | 25 ["root@${::fqdn}", |
26 "@${::fqdn}"]: | 26 "@${::fqdn}"]: |
27 ensure => 'absent', | 27 ensure => 'absent', |
28 require => Anchor['mysql::server::end'], | 28 require => Anchor['mysql::server::end'], |
29 } | 29 } |
30 } | 30 } |
31 if ($::fqdn != $::hostname) { | 31 if ($::fqdn != $::hostname) { |
32 if ($::hostname != 'localhost') { | 32 if ($::hostname != 'localhost') { |
33 mysql_user { ["root@${::hostname}", "@${::hostname}"]: | 33 mysql_user { ["root@${::hostname}", "@${::hostname}"]: |