Index: modules/nginx/manifests/module.pp |
diff --git a/modules/nginx/manifests/module.pp b/modules/nginx/manifests/module.pp |
new file mode 100644 |
index 0000000000000000000000000000000000000000..5ef5330be1f87b6bbd545c51cb050ae151686817 |
--- /dev/null |
+++ b/modules/nginx/manifests/module.pp |
@@ -0,0 +1,27 @@ |
+define nginx::module ( |
+ $ensure = 'present', |
+ $package = {}, |
+ $path = "modules/$name", |
+) { |
+ |
+ include nginx |
+ include stdlib |
+ |
+ $id = "nginx-module-$title" |
+ |
+ ensure_resource('package', $id, merge({ |
+ 'ensure' => $ensure, |
+ }, $package)) |
+ |
+ if ensure_state(Package[$id]) { |
+ |
+ concat::fragment {$id: |
+ content => template('nginx/module.erb'), |
+ order => '01', |
+ target => '/etc/nginx/nginx.conf', |
+ } |
+ |
+ Concat::Fragment[$id] <- Package[$id] |
+ Concat::Fragment[$id] ~> Service['nginx'] |
+ } |
+} |