File tree Expand file tree Collapse file tree 4 files changed +19
-79
lines changed Expand file tree Collapse file tree 4 files changed +19
-79
lines changed Original file line number Diff line number Diff line change 36
36
}
37
37
$environment = deep_merge($env_defaults , $env )
38
38
39
- if $facts [' service_provider' ] == ' systemd' {
40
- include systemd
39
+ include systemd
41
40
42
- file { "/etc/systemd/system/${service_name}.service" :
43
- ensure => file ,
44
- mode => ' 0644' ,
45
- content => template (' kafka/unit.erb' ),
46
- }
47
-
48
- file { "/etc/init.d/${service_name}" :
49
- ensure => absent ,
50
- }
51
-
52
- File [" /etc/systemd/system/${service_name} .service" ]
53
- ~> Service[$service_name ]
54
- } else {
55
- file { "/etc/init.d/${service_name}" :
56
- ensure => file ,
57
- mode => ' 0755' ,
58
- content => template (' kafka/init.erb' ),
59
- before => Service[$service_name ],
60
- }
41
+ file { "/etc/systemd/system/${service_name}.service" :
42
+ ensure => file ,
43
+ mode => ' 0644' ,
44
+ content => template (' kafka/unit.erb' ),
61
45
}
62
-
63
- service { $service_name:
46
+ ~> service { $service_name:
64
47
ensure => $service_ensure ,
65
48
enable => true ,
66
49
hasstatus => true ,
Original file line number Diff line number Diff line change 36
36
}
37
37
$environment = deep_merge($env_defaults , $env )
38
38
39
- if $facts [' service_provider' ] == ' systemd' {
40
- include systemd
39
+ include systemd
41
40
42
- file { "/etc/systemd/system/${service_name}.service" :
43
- ensure => file ,
44
- mode => ' 0644' ,
45
- content => template (' kafka/unit.erb' ),
46
- }
47
-
48
- file { "/etc/init.d/${service_name}" :
49
- ensure => absent ,
50
- }
51
-
52
- File [" /etc/systemd/system/${service_name} .service" ]
53
- ~> Service[$service_name ]
54
- } else {
55
- file { "/etc/init.d/${service_name}" :
56
- ensure => file ,
57
- mode => ' 0755' ,
58
- content => template (' kafka/init.erb' ),
59
- before => Service[$service_name ],
60
- }
41
+ file { "/etc/systemd/system/${service_name}.service" :
42
+ ensure => file ,
43
+ mode => ' 0644' ,
44
+ content => template (' kafka/unit.erb' ),
61
45
}
62
-
63
- service { $service_name:
46
+ ~> service { $service_name:
64
47
ensure => $service_ensure ,
65
48
enable => true ,
66
49
hasstatus => true ,
Original file line number Diff line number Diff line change 33
33
}
34
34
$environment = deep_merge($env_defaults , $env )
35
35
36
- if $facts [' service_provider' ] == ' systemd' {
37
- include systemd
36
+ include systemd
38
37
39
- file { "/etc/systemd/system/${service_name}.service" :
40
- ensure => file ,
41
- mode => ' 0644' ,
42
- content => template (' kafka/unit.erb' ),
43
- }
44
-
45
- file { "/etc/init.d/${service_name}" :
46
- ensure => absent ,
47
- }
48
-
49
- File [" /etc/systemd/system/${service_name} .service" ]
50
- ~> Service[$service_name ]
51
- } else {
52
- file { "/etc/init.d/${service_name}" :
53
- ensure => file ,
54
- mode => ' 0755' ,
55
- content => template (' kafka/init.erb' ),
56
- before => Service[$service_name ],
57
- }
38
+ file { "/etc/systemd/system/${service_name}.service" :
39
+ ensure => file ,
40
+ mode => ' 0644' ,
41
+ content => template (' kafka/unit.erb' ),
58
42
}
59
-
60
- service { $service_name:
43
+ ~> service { $service_name:
61
44
ensure => $service_ensure ,
62
45
enable => true ,
63
46
hasstatus => true ,
Original file line number Diff line number Diff line change 37
37
}
38
38
$environment = deep_merge($env_defaults , $env )
39
39
40
- if $facts [' service_provider' ] == ' systemd' {
41
- fail(' Console Producer is not supported on systemd, because the stdin of the process cannot be redirected' )
42
- } else {
43
- file { "/etc/init.d/${service_name}" :
44
- ensure => file ,
45
- mode => ' 0755' ,
46
- content => template (' kafka/init.erb' ),
47
- before => Service[$service_name ],
48
- }
49
- }
40
+ fail(' Console Producer is not supported on systemd, because the stdin of the process cannot be redirected' )
50
41
51
42
service { $service_name:
52
43
ensure => $service_ensure ,
You can’t perform that action at this time.
0 commit comments