Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: modules/nginx/manifests/module.pp

Issue 29481620: #1990 - Introduce nginx::module type (Closed)
Patch Set: Created July 6, 2017, 11:08 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « modules/nginx/manifests/init.pp ('k') | modules/nginx/templates/module.erb » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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']
+ }
+}
« no previous file with comments | « modules/nginx/manifests/init.pp ('k') | modules/nginx/templates/module.erb » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld