File tree 2 files changed +8
-8
lines changed
2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 12
12
ensure => ' absent' ,
13
13
require => Anchor[' mysql::server::end' ],
14
14
}
15
- if ($:: fqdn != ' localhost.localdomain' ) {
15
+ if ($facts [ ' networking ' ][ ' fqdn' ] != ' localhost.localdomain' ) {
16
16
mysql_user {
17
17
[' root@localhost.localdomain' ,
18
18
' @localhost.localdomain' ]:
19
19
ensure => ' absent' ,
20
20
require => Anchor[' mysql::server::end' ],
21
21
}
22
22
}
23
- if ($:: fqdn and $:: fqdn != ' localhost' ) {
23
+ if ($facts [ ' networking ' ][ ' fqdn' ] and $facts [ ' networking ' ][ ' fqdn' ] != ' localhost' ) {
24
24
mysql_user {
25
- [" root@${:: fqdn} " ,
26
- " @${:: fqdn} " ]:
25
+ [" root@${facts['networking'][' fqdn'] }" ,
26
+ " @${facts['networking'][' fqdn'] }" ]:
27
27
ensure => ' absent' ,
28
28
require => Anchor[' mysql::server::end' ],
29
29
}
30
30
}
31
- if ($:: fqdn != $facts [' networking' ][' hostname' ]) {
31
+ if ($facts [ ' networking ' ][ ' fqdn' ] != $facts [' networking' ][' hostname' ]) {
32
32
if ($facts [' networking' ][' hostname' ] != ' localhost' ) {
33
33
mysql_user { [" root@${facts['networking']['hostname']}" , " @${facts['networking']['hostname']}" ]:
34
34
ensure => ' absent' ,
Original file line number Diff line number Diff line change 14
14
context 'with fqdn==myhost.mydomain' do
15
15
let ( :facts ) do
16
16
facts . merge ( root_home : '/root' ,
17
- fqdn : 'myhost.mydomain' ,
18
17
networking : {
18
+ fqdn : 'myhost.mydomain' ,
19
19
hostname : 'myhost'
20
20
} )
21
21
end
48
48
context 'with fqdn==localhost' do
49
49
let ( :facts ) do
50
50
facts . merge ( root_home : '/root' ,
51
- fqdn : 'localhost' ,
52
51
networking : {
52
+ fqdn : 'localhost' ,
53
53
hostname : 'localhost'
54
54
} )
55
55
end
69
69
context 'with fqdn==localhost.localdomain' do
70
70
let ( :facts ) do
71
71
facts . merge ( root_home : '/root' ,
72
- fqdn : 'localhost.localdomain' ,
73
72
networking : {
73
+ fqdn : 'localhost.localdomain' ,
74
74
hostname : 'localhost'
75
75
} )
76
76
end
You can’t perform that action at this time.
0 commit comments