File tree 3 files changed +13
-7
lines changed
3 files changed +13
-7
lines changed Original file line number Diff line number Diff line change 340
340
$config_file = ' /etc/my.cnf'
341
341
$includedir = undef
342
342
$datadir = ' /var/mysql'
343
- $log_error = " /var/mysql/${:: hostname} .err"
343
+ $log_error = " /var/mysql/${facts['networking'][' hostname'] }.err"
344
344
$pidfile = ' /var/mysql/mysql.pid'
345
345
$root_group = ' wheel'
346
346
$mysql_group = ' _mysql'
Original file line number Diff line number Diff line change 28
28
require => Anchor[' mysql::server::end' ],
29
29
}
30
30
}
31
- if ($::fqdn != $:: hostname ) {
32
- if ($:: hostname != ' localhost' ) {
33
- mysql_user { [" root@${:: hostname} " , " @${:: hostname} " ]:
31
+ if ($::fqdn != $facts [ ' networking ' ][ ' hostname' ] ) {
32
+ if ($facts [ ' networking ' ][ ' hostname' ] != ' localhost' ) {
33
+ mysql_user { [" root@${facts['networking'][' hostname'] }" , " @${facts['networking'][' hostname'] }" ]:
34
34
ensure => ' absent' ,
35
35
require => Anchor[' mysql::server::end' ],
36
36
}
Original file line number Diff line number Diff line change 15
15
let ( :facts ) do
16
16
facts . merge ( root_home : '/root' ,
17
17
fqdn : 'myhost.mydomain' ,
18
- hostname : 'myhost' )
18
+ networking : {
19
+ hostname : 'myhost'
20
+ } )
19
21
end
20
22
21
23
[ 'root@myhost.mydomain' ,
47
49
let ( :facts ) do
48
50
facts . merge ( root_home : '/root' ,
49
51
fqdn : 'localhost' ,
50
- hostname : 'localhost' )
52
+ networking : {
53
+ hostname : 'localhost'
54
+ } )
51
55
end
52
56
53
57
[ 'root@127.0.0.1' ,
66
70
let ( :facts ) do
67
71
facts . merge ( root_home : '/root' ,
68
72
fqdn : 'localhost.localdomain' ,
69
- hostname : 'localhost' )
73
+ networking : {
74
+ hostname : 'localhost'
75
+ } )
70
76
end
71
77
72
78
[ 'root@127.0.0.1' ,
You can’t perform that action at this time.
0 commit comments