Skip to content

Commit

Permalink
Merge pull request #1438 from saz/master
Browse files Browse the repository at this point in the history
makes service_config_check exec command configurable
  • Loading branch information
ekohl authored Jan 24, 2021
2 parents 81354a4 + 36b5ca9 commit 730a20a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@
# @param service_config_check
# whether to en- or disable the config check via nginx -t on config changes
#
# @param service_config_check_command
# Command to execute to validate the generated configuration.
#
class nginx (
### START Nginx Configuration ###
Variant[Stdlib::Absolutepath, Boolean] $client_body_temp_path = $nginx::params::client_body_temp_path,
Expand Down Expand Up @@ -195,6 +198,7 @@
$service_name = 'nginx',
$service_manage = true,
Boolean $service_config_check = false,
String $service_config_check_command = 'nginx -t',
### END Service Configuration ###

### START Hiera Lookups ###
Expand Down
2 changes: 1 addition & 1 deletion manifests/service.pp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

if $nginx::service_config_check {
exec { 'nginx_config_check':
command => 'nginx -t',
command => $nginx::service_config_check_command,
refreshonly => true,
path => [
'/usr/local/sbin',
Expand Down

0 comments on commit 730a20a

Please sign in to comment.