Skip to content

Commit 730a20a

Browse files
authored
Merge pull request #1438 from saz/master
makes service_config_check exec command configurable
2 parents 81354a4 + 36b5ca9 commit 730a20a

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

manifests/init.pp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@
3131
# @param service_config_check
3232
# whether to en- or disable the config check via nginx -t on config changes
3333
#
34+
# @param service_config_check_command
35+
# Command to execute to validate the generated configuration.
36+
#
3437
class nginx (
3538
### START Nginx Configuration ###
3639
Variant[Stdlib::Absolutepath, Boolean] $client_body_temp_path = $nginx::params::client_body_temp_path,
@@ -195,6 +198,7 @@
195198
$service_name = 'nginx',
196199
$service_manage = true,
197200
Boolean $service_config_check = false,
201+
String $service_config_check_command = 'nginx -t',
198202
### END Service Configuration ###
199203

200204
### START Hiera Lookups ###

manifests/service.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
if $nginx::service_config_check {
99
exec { 'nginx_config_check':
10-
command => 'nginx -t',
10+
command => $nginx::service_config_check_command,
1111
refreshonly => true,
1212
path => [
1313
'/usr/local/sbin',

0 commit comments

Comments
 (0)