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
end
21
21
47
47
context 'with fqdn==localhost' do
48
48
let ( :facts ) do
49
49
facts . merge ( root_home : '/root' ,
50
- fqdn : 'localhost' ,
51
50
netwoking : {
51
+ fqdn : 'localhost' ,
52
52
hostname : 'localhost' } )
53
53
end
54
54
67
67
context 'with fqdn==localhost.localdomain' do
68
68
let ( :facts ) do
69
69
facts . merge ( root_home : '/root' ,
70
- fqdn : 'localhost.localdomain' ,
71
70
netwoking : {
71
+ fqdn : 'localhost.localdomain' ,
72
72
hostname : 'localhost' } )
73
73
end
74
74
You can’t perform that action at this time.
0 commit comments