From be02089dc464fe31b32d995b575c3d89e52153c2 Mon Sep 17 00:00:00 2001 From: Jan-Martin Raemer Date: Wed, 18 Nov 2020 08:46:02 +0100 Subject: [PATCH 1/2] add nginx::proxy_bind --- manifests/config.pp | 1 + manifests/init.pp | 1 + templates/conf.d/nginx.conf.erb | 3 +++ 3 files changed, 5 insertions(+) diff --git a/manifests/config.pp b/manifests/config.pp index 7533b412a..6c103a2fe 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -116,6 +116,7 @@ $proxy_set_header = $nginx::proxy_set_header $proxy_hide_header = $nginx::proxy_hide_header $proxy_pass_header = $nginx::proxy_pass_header + $proxy_bind = $nginx::proxy_bind $sendfile = $nginx::sendfile $server_tokens = $nginx::server_tokens $spdy = $nginx::spdy diff --git a/manifests/init.pp b/manifests/init.pp index 17b8f596c..e83076830 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -154,6 +154,7 @@ ], Array $proxy_hide_header = [], Array $proxy_pass_header = [], + String $proxy_bind = undef, Array $proxy_ignore_header = [], Optional[Nginx::Size] $proxy_max_temp_file_size = undef, Optional[Nginx::Size] $proxy_busy_buffers_size = undef, diff --git a/templates/conf.d/nginx.conf.erb b/templates/conf.d/nginx.conf.erb index 5bcbc7958..eddc855a3 100644 --- a/templates/conf.d/nginx.conf.erb +++ b/templates/conf.d/nginx.conf.erb @@ -199,6 +199,9 @@ http { <% @proxy_pass_header.each do |header| -%> proxy_pass_header <%= header %>; <% end -%> +<% if @proxy_bind -%> + proxy_bind <%= @proxy_bind %>; +<% end -%> <% if @proxy_headers_hash_bucket_size -%> proxy_headers_hash_bucket_size <%= @proxy_headers_hash_bucket_size %>; <% end -%> From 438b33e6a4d979764f69fae5a06d97a81d83e5be Mon Sep 17 00:00:00 2001 From: Jan-Martin Raemer Date: Wed, 18 Nov 2020 10:04:48 +0100 Subject: [PATCH 2/2] make nginx::proxy_bind optional --- manifests/init.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/init.pp b/manifests/init.pp index e83076830..cec89a49a 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -154,7 +154,7 @@ ], Array $proxy_hide_header = [], Array $proxy_pass_header = [], - String $proxy_bind = undef, + Optional[String] $proxy_bind = undef, Array $proxy_ignore_header = [], Optional[Nginx::Size] $proxy_max_temp_file_size = undef, Optional[Nginx::Size] $proxy_busy_buffers_size = undef,