Skip to content

Updates #20

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions data/common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 1 addition & 2 deletions manifests/install.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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']}")
Expand Down
11 changes: 8 additions & 3 deletions metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,17 @@
"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",
"version_requirement": ">= 4.5.1"
}
],
"operatingsystem_support": [
Expand Down Expand Up @@ -51,7 +55,8 @@
"operatingsystem": "Ubuntu",
"operatingsystemrelease": [
"14.04",
"16.04"
"16.04",
"18.04"
]
},
{
Expand Down
16 changes: 8 additions & 8 deletions templates/tinyproxy.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -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 -%>

#
Expand Down Expand Up @@ -311,7 +311,7 @@ Filter "<%= @filter %>"
<%- if @filter_urls.nil? -%>
#FilterURLs On
<%- else -%>
FilterURLs "<%= @filter_urls ? 'On' : 'Off' %>"
FilterURLs <%= @filter_urls ? 'On' : 'Off' %>
<%- end -%>

#
Expand All @@ -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 -%>

#
Expand All @@ -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 -%>

#
Expand All @@ -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 -%>

#
Expand Down