From 9d7ce2bee48d6be6782d992ca5f90953282d592c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Ferraz?= Date: Mon, 3 Dec 2018 14:51:02 -0200 Subject: [PATCH 1/5] Include dep of apt::update without including apt global declaration --- manifests/install.pp | 3 +-- metadata.json | 4 ++++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/manifests/install.pp b/manifests/install.pp index 9abeb7f..9f5aecb 100644 --- a/manifests/install.pp +++ b/manifests/install.pp @@ -10,8 +10,7 @@ } } 'Debian': { - include ::apt - require ::apt::update + Class['apt::update'] -> Package<| provider == 'apt' |> } default: { fail("Module ${module_name} is not supported on ${facts['os']['family']}") diff --git a/metadata.json b/metadata.json index c32d56d..b845bdd 100644 --- a/metadata.json +++ b/metadata.json @@ -23,6 +23,10 @@ { "name": "puppetlabs-stdlib", "version_requirement": ">= 4.0.0 < 5.0.0" + }, + { + "name": "puppetlabs-apt", + "version_requirement": ">= 4.5.1" } ], "operatingsystem_support": [ From 6fb6d282e894f68873ea952b6cb9bcd8aee8276b Mon Sep 17 00:00:00 2001 From: Chris Butler Date: Thu, 14 Feb 2019 16:58:38 +0000 Subject: [PATCH 2/5] Use arrays for Allow and Deny The Allow and Deny options can be specified multiple times to allow/deny multiple IP ranges, etc. Changed these arguments to be arrays instead of strings. --- data/common.yaml | 5 +++-- manifests/config.pp | 4 ++-- manifests/init.pp | 4 ++-- templates/tinyproxy.conf.erb | 8 ++++---- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/data/common.yaml b/data/common.yaml index f4d4b43..41a4409 100644 --- a/data/common.yaml +++ b/data/common.yaml @@ -23,8 +23,9 @@ tinyproxy::min_spare_servers: 5 tinyproxy::max_spare_servers: 20 tinyproxy::start_servers: 10 tinyproxy::max_requests_per_child: 0 -tinyproxy::allow: '127.0.0.1' -tinyproxy::deny: null +tinyproxy::allow: + - '127.0.0.1' +tinyproxy::deny: [] tinyproxy::add_headers: null tinyproxy::via_proxy_name: 'tinyproxy' tinyproxy::disable_via_header: false diff --git a/manifests/config.pp b/manifests/config.pp index 8c9985e..a2703b8 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -24,8 +24,8 @@ Integer $max_spare_servers, Integer $start_servers, Integer $max_requests_per_child, - Optional[String] $allow, - Optional[String] $deny, + Array[String] $allow, + Array[String] $deny, Optional[Hash[String, String]] $add_headers, String $via_proxy_name, Boolean $disable_via_header, diff --git a/manifests/init.pp b/manifests/init.pp index 7f6eaef..96c9f7a 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -30,8 +30,8 @@ Integer $max_spare_servers, Integer $start_servers, Integer $max_requests_per_child, - Optional[String] $allow, - Optional[String] $deny, + Array[String] $allow, + Array[String] $deny, Optional[Hash[String, String]] $add_headers, String $via_proxy_name, Boolean $disable_via_header, diff --git a/templates/tinyproxy.conf.erb b/templates/tinyproxy.conf.erb index c302931..cdb02be 100644 --- a/templates/tinyproxy.conf.erb +++ b/templates/tinyproxy.conf.erb @@ -255,11 +255,11 @@ MaxRequestsPerChild <%= @max_requests_per_child %> # The order of the controls are important. All incoming connections are # tested against the controls based on order. # -<%- if @allow -%> -Allow <%= @allow %> +<%- @allow.each do |ip| -%> +Allow <%= ip %> <%- end -%> -<%- if @deny -%> -Deny <%= @deny %> +<%- @deny.each do |ip| -%> +Deny <%= ip %> <%- end -%> # From a508b5325f187648e14afc7c883984d69b1c79ad Mon Sep 17 00:00:00 2001 From: Chris Butler Date: Thu, 14 Feb 2019 17:00:17 +0000 Subject: [PATCH 3/5] remove quotes around Filter* boolean options The quotes around the various Filter* Yes/No and On/Off options were causing a syntax error, so this change removes them. --- templates/tinyproxy.conf.erb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/templates/tinyproxy.conf.erb b/templates/tinyproxy.conf.erb index c302931..a290084 100644 --- a/templates/tinyproxy.conf.erb +++ b/templates/tinyproxy.conf.erb @@ -311,7 +311,7 @@ Filter "<%= @filter %>" <%- if @filter_urls.nil? -%> #FilterURLs On <%- else -%> -FilterURLs "<%= @filter_urls ? 'On' : 'Off' %>" +FilterURLs <%= @filter_urls ? 'On' : 'Off' %> <%- end -%> # @@ -321,7 +321,7 @@ FilterURLs "<%= @filter_urls ? 'On' : 'Off' %>" <%- if @filter_extended.nil? -%> #FilterExtended On <%- else -%> -FilterExtended "<%= @filter_extended ? 'On' : 'Off' %>" +FilterExtended <%= @filter_extended ? 'On' : 'Off' %> <%- end -%> # @@ -330,7 +330,7 @@ FilterExtended "<%= @filter_extended ? 'On' : 'Off' %>" <%- if @filter_case_sensitive.nil? -%> #FilterCaseSensitive On <%- else -%> -FilterCaseSensitive "<%= @filter_case_sensitive ? 'On' : 'Off' %>" +FilterCaseSensitive <%= @filter_case_sensitive ? 'On' : 'Off' %> <%- end -%> # @@ -346,7 +346,7 @@ FilterCaseSensitive "<%= @filter_case_sensitive ? 'On' : 'Off' %>" <%- if @filter_default_deny.nil? -%> #FilterDefaultDeny Yes <%- else -%> -FilterDefaultDeny "<%= @filter_default_deny ? 'Yes' : 'No' %>" +FilterDefaultDeny <%= @filter_default_deny ? 'Yes' : 'No' %> <%- end -%> # From 3538f214f5565295a72dda0cdcc6ae13e2f4d6d1 Mon Sep 17 00:00:00 2001 From: nicko170 Date: Thu, 2 Apr 2020 11:59:30 +1100 Subject: [PATCH 4/5] Update metadata.json --- metadata.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/metadata.json b/metadata.json index c32d56d..341de3b 100644 --- a/metadata.json +++ b/metadata.json @@ -51,7 +51,8 @@ "operatingsystem": "Ubuntu", "operatingsystemrelease": [ "14.04", - "16.04" + "16.04", + "18.04" ] }, { From 896c35341f025b8b8be88d82f7ae98e5a96f43a6 Mon Sep 17 00:00:00 2001 From: Marcus-IXAU <62982527+Marcus-IXAU@users.noreply.github.com> Date: Mon, 6 Apr 2020 09:53:06 +0800 Subject: [PATCH 5/5] Update requirements & dependencies --- metadata.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/metadata.json b/metadata.json index 94bda06..90890dd 100644 --- a/metadata.json +++ b/metadata.json @@ -16,13 +16,13 @@ "requirements": [ { "name": "puppet", - "version_requirement": ">=4.9.0 < 6.0.0" + "version_requirement": ">=4.9.0 < 7.0.0" } ], "dependencies": [ { "name": "puppetlabs-stdlib", - "version_requirement": ">= 4.0.0 < 5.0.0" + "version_requirement": ">= 4.0.0 < 7.0.0" }, { "name": "puppetlabs-apt",