Skip to content

Commit decae42

Browse files
committed
Adding strings compatible docs
1 parent 3a97e5b commit decae42

File tree

2 files changed

+51
-6
lines changed

2 files changed

+51
-6
lines changed

manifests/init.pp

+46-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,48 @@
1+
# = Class: squid
2+
#
3+
# Base Squid class
4+
#
5+
# == Parameters
6+
#
7+
# [*cache_dir*]
8+
# String. Filesystem location to locate cache
9+
# Default: /var/spool/squid3
10+
#
11+
# [*cache_dir_size*]
12+
# Integer. Size in MB of cache to keep
13+
# Default: 5000
14+
#
15+
# [*port*]
16+
# Integer. Port for squid to listen on
17+
# Default: 3128
18+
#
19+
# [*maximum_object_size*]
20+
# Integer. Biggest object to cache in MB
21+
# Default: 3128
22+
#
23+
# [*http_access*]
24+
# Array of strings. HTTP access list rules.
25+
# Default: []
26+
# Example: [ 'allow localnet', 'deny mynet' ]
27+
#
28+
# [*cache_peer*]
29+
# Array of strings. Upstream caches to peer with
30+
# Default: []
31+
# Example: [ 'squid3.example.com' ]
32+
#
33+
# [*cache_peer_access*]
34+
# Array of strings. ACL entries for cache peers
35+
# Default: []
36+
#
37+
# [*never_direct*]
38+
# Array of strings. Hosts to connect directly to
39+
# Default: []
40+
# Example: [ 'directconnect1.example.com' ]
41+
#
42+
# [*cache_only*]
43+
# Boolean. Use the cache never
44+
# Default: false
45+
#
146
# Puppet module to manage the squid http proxy server
247
# Source: https://github.com/pro-puppet/puppet-module-squid
348

@@ -10,7 +55,7 @@
1055
$cache_peer = undef,
1156
$cache_peer_access = undef,
1257
$never_direct = undef,
13-
$cache_only = undef,
58+
$cache_only = false,
1459
) inherits squid::params {
1560

1661

templates/squid.conf.erb

+5-5
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ http_access deny !Safe_ports
2020
http_access deny CONNECT !SSL_ports
2121
http_access allow localnet
2222
http_access allow localhost
23-
<% if @http_access -%>
24-
<% @http_access.each do |val| -%>
23+
<% if @http_access -%>
24+
<% @http_access.each do |val| -%>
2525
http_access <%= val %>
26-
<% end -%>
27-
<% end -%>
26+
<% end -%>
27+
<% end -%>
2828
http_access deny all
2929
http_port <%= @port %>
3030
maximum_object_size <%= @maximum_object_size %> MB
@@ -41,7 +41,7 @@ refresh_all_ims on
4141
cache_peer <%= val %>
4242
<% end -%>
4343
<% end -%>
44-
<% if @cache_peer_access -%>
44+
<% if @cache_peer_access -%>
4545
<% @cache_peer_access.each do |val| -%>
4646
cache_peer_access <%= val %>
4747
<% end -%>

0 commit comments

Comments
 (0)