From 6e0a70e349822b7a24e73d2f43d29848b5e90223 Mon Sep 17 00:00:00 2001 From: Enrico Stahn Date: Wed, 15 May 2013 15:24:38 +1000 Subject: [PATCH] Add ability to pass site configuration content or template --- manifests/fcgi/site.pp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/manifests/fcgi/site.pp b/manifests/fcgi/site.pp index 02f05e6..3a23ef4 100644 --- a/manifests/fcgi/site.pp +++ b/manifests/fcgi/site.pp @@ -37,6 +37,8 @@ $root, $fastcgi_pass, $ensure = 'present', + $content = undef, + $template = undef, $index = 'index.php', $include = '', $listen = '80', @@ -78,9 +80,19 @@ default => $ssl_certificate_key, } + $site_template = $template ? { + undef => 'nginx/fcgi_site.erb', + default => $template, + } + + $site_content = $content ? { + undef => template($site_template), + default => $content, + } + nginx::site { $name: ensure => $ensure, - content => template('nginx/fcgi_site.erb'), + content => $site_content, } }