OLD | NEW |
(Empty) | |
| 1 define nginx::module ( |
| 2 $ensure = 'present', |
| 3 $package = {}, |
| 4 $path = "modules/$name", |
| 5 ) { |
| 6 |
| 7 include nginx |
| 8 include stdlib |
| 9 |
| 10 $id = "nginx-module-$title" |
| 11 |
| 12 ensure_resource('package', $id, merge({ |
| 13 'ensure' => $ensure, |
| 14 }, $package)) |
| 15 |
| 16 if ensure_state(Package[$id]) { |
| 17 |
| 18 concat::fragment {$id: |
| 19 content => template('nginx/module.erb'), |
| 20 order => '01', |
| 21 target => '/etc/nginx/nginx.conf', |
| 22 } |
| 23 |
| 24 Concat::Fragment[$id] <- Package[$id] |
| 25 Concat::Fragment[$id] ~> Service['nginx'] |
| 26 } |
| 27 } |
OLD | NEW |