File tree 3 files changed +10
-7
lines changed
3 files changed +10
-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' } )
19
20
end
20
21
21
22
[ 'root@myhost.mydomain' ,
47
48
let ( :facts ) do
48
49
facts . merge ( root_home : '/root' ,
49
50
fqdn : 'localhost' ,
50
- hostname : 'localhost' )
51
+ netwoking : {
52
+ hostname : 'localhost' } )
51
53
end
52
54
53
55
[ 'root@127.0.0.1' ,
66
68
let ( :facts ) do
67
69
facts . merge ( root_home : '/root' ,
68
70
fqdn : 'localhost.localdomain' ,
69
- hostname : 'localhost' )
71
+ netwoking : {
72
+ hostname : 'localhost' } )
70
73
end
71
74
72
75
[ 'root@127.0.0.1' ,
You can’t perform that action at this time.
0 commit comments