|
35 | 35 | Any $create_user = undef, |
36 | 36 | ) { |
37 | 37 |
|
| 38 | + include jenkins |
| 39 | + |
| 40 | + if $jenkins::manage_service { |
| 41 | + $notify = Class['jenkins::service'] |
| 42 | + } else { |
| 43 | + $notify = undef |
| 44 | + } |
| 45 | + |
| 46 | + if $jenkins::manage_datadirs { |
| 47 | + $plugindir = File[$jenkins::plugin_dir] |
| 48 | + } else { |
| 49 | + $plugindir = undef |
| 50 | + } |
| 51 | + |
38 | 52 | if $timeout { |
39 | 53 | warning('jenkins::plugin::timeout presently has effect') |
40 | 54 | } |
|
138 | 152 | group => $::jenkins::group, |
139 | 153 | mode => '0644', |
140 | 154 | require => Archive[$plugin], |
141 | | - notify => Class['::jenkins::service'], |
| 155 | + notify => $notify, |
142 | 156 | } |
143 | 157 |
|
144 | 158 | $pinned_ensure = $pin ? { |
|
151 | 165 | owner => $::jenkins::user, |
152 | 166 | group => $::jenkins::group, |
153 | 167 | require => Archive[$plugin], |
154 | | - notify => Class['::jenkins::service'], |
| 168 | + notify => $notify, |
155 | 169 | } |
156 | 170 |
|
157 | 171 | if $digest_string { |
|
176 | 190 | proxy_server => $::jenkins::proxy::url, |
177 | 191 | cleanup => false, |
178 | 192 | extract => false, |
179 | | - require => File[$::jenkins::plugin_dir], |
180 | | - notify => Class['::jenkins::service'], |
| 193 | + require => $plugindir, |
| 194 | + notify => $notify, |
181 | 195 | } |
182 | 196 | $archive_require = Archive[$plugin] |
183 | 197 | } else { |
|
189 | 203 | group => $::jenkins::group, |
190 | 204 | mode => '0644', |
191 | 205 | require => $archive_require, |
192 | | - before => Class['::jenkins::service'], |
| 206 | + before => $notify, |
193 | 207 | } |
194 | 208 |
|
195 | 209 | if $manage_config { |
|
0 commit comments