From 36b5ca98e4e68684997c8c4d9254a397744e6445 Mon Sep 17 00:00:00 2001 From: Steffen Zieger Date: Sun, 24 Jan 2021 00:57:54 +0100 Subject: [PATCH] makes service_config_check exec command configurable --- manifests/init.pp | 4 ++++ manifests/service.pp | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/manifests/init.pp b/manifests/init.pp index 56da23d95..7cde4625f 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -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, @@ -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 ### diff --git a/manifests/service.pp b/manifests/service.pp index bc33cdce6..ce382b7dd 100644 --- a/manifests/service.pp +++ b/manifests/service.pp @@ -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',