Skip to content

Commit 570434f

Browse files
authored
Merge pull request #1451 from TuningYourCode/overwrite-templates
Add variables to overwrite fastcgi.conf and uwsgi_params template
2 parents 8d45e5b + faf7255 commit 570434f

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

manifests/init.pp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,9 @@
7373
Boolean $include_modules_enabled = $nginx::params::include_modules_enabled,
7474

7575
# Primary Templates
76-
$conf_template = 'nginx/conf.d/nginx.conf.erb',
76+
String[1] $conf_template = 'nginx/conf.d/nginx.conf.erb',
77+
String[1] $fastcgi_conf_template = 'nginx/server/fastcgi.conf.erb',
78+
String[1] $uwsgi_params_template = 'nginx/server/uwsgi_params.erb',
7779

7880
### START Nginx Configuration ###
7981
Optional[Enum['on', 'off']] $absolute_redirect = undef,

manifests/resource/location.pp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@
346346
file { $fastcgi_params:
347347
ensure => 'file',
348348
mode => $nginx::global_mode,
349-
content => template('nginx/server/fastcgi.conf.erb'),
349+
content => template($nginx::fastcgi_conf_template),
350350
tag => 'nginx_config_file',
351351
}
352352
}
@@ -355,7 +355,7 @@
355355
file { $uwsgi_params:
356356
ensure => 'file',
357357
mode => $nginx::global_mode,
358-
content => template('nginx/server/uwsgi_params.erb'),
358+
content => template($nginx::uwsgi_params_template),
359359
tag => 'nginx_config_file',
360360
}
361361
}

manifests/resource/server.pp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -567,15 +567,15 @@
567567
file { $fastcgi_params:
568568
ensure => file,
569569
mode => $nginx::global_mode,
570-
content => template('nginx/server/fastcgi.conf.erb'),
570+
content => template($nginx::fastcgi_conf_template),
571571
}
572572
}
573573

574574
if $uwsgi != undef and !defined(File[$uwsgi_params]) and $uwsgi_params == "${nginx::conf_dir}/uwsgi_params" {
575575
file { $uwsgi_params:
576576
ensure => file,
577577
mode => $nginx::global_mode,
578-
content => template('nginx/server/uwsgi_params.erb'),
578+
content => template($nginx::uwsgi_params_template),
579579
}
580580
}
581581

0 commit comments

Comments
 (0)