diff --git a/REFERENCE.md b/REFERENCE.md index ff104ab7f..8188c1057 100644 --- a/REFERENCE.md +++ b/REFERENCE.md @@ -805,11 +805,11 @@ Default value: `20` ##### `gzip_http_version` -Data type: `Float` +Data type: `Variant[Enum['1.0','1.1'], Float]` -Default value: `1.1` +Default value: `'1.1'` ##### `gzip_proxied` @@ -901,11 +901,11 @@ Default value: `'65s'` ##### `keepalive_requests` -Data type: `String` +Data type: `Variant[Integer, String]` -Default value: `'100'` +Default value: `100` ##### `log_format` diff --git a/manifests/init.pp b/manifests/init.pp index 94d10fb87..f78afd2e5 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -111,7 +111,7 @@ Integer $gzip_comp_level = 1, String $gzip_disable = 'msie6', Integer $gzip_min_length = 20, - Float $gzip_http_version = 1.1, + Variant[Enum['1.0','1.1'], Float] $gzip_http_version = '1.1', Nginx::GzipProxied $gzip_proxied = 'off', Optional[Variant[String[1],Array[String[1]]]] $gzip_types = undef, Enum['on', 'off'] $gzip_vary = 'off', @@ -123,7 +123,7 @@ Enum['on', 'off'] $http_tcp_nodelay = 'on', Enum['on', 'off'] $http_tcp_nopush = 'off', Nginx::Time $keepalive_timeout = '65s', - String $keepalive_requests = '100', + Variant[Integer, String] $keepalive_requests = 100, Hash[String[1], Nginx::LogFormat] $log_format = {}, Hash[String[1], Nginx::LogFormat] $stream_log_format = {}, Boolean $mail = false, @@ -244,6 +244,13 @@ ### END Hiera Lookups ### ) inherits nginx::params { + if $gzip_http_version =~ Float { + deprecation('gzip_http_version', 'Passing a Float is deprecated, please pass a String') + } + if $keepalive_requests =~ String { + deprecation('keepalive_requests', 'Passing a String is deprecated, please pass a Integer') + } + contain 'nginx::package' contain 'nginx::config' contain 'nginx::service'