blob: 193d4cf7560628207c77006d8ea5e8cb43d84f9c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
# Class: profiles::squid.pp
# =========================
#
# This class defines a Squid proxy installation that allows outgoing http and
# https traffic to selected destinations.
#
# Parameters
# ----------
#
# @param acls a list of squid ACLs for regulating outgoing traffic
#
# Examples
# --------
#
# @example
# class roles::myhost {
# include profiles::squid
# }
#
# Authors
# -------
#
# Jan Dittberner <jandd@cacert.org>
#
# Copyright
# ---------
#
# Copyright 2017 Jan Dittberner
class profiles::squid (
Optional[Array[String]] $acls = undef,
Optional[Array[String]] $http_access = undef,
) {
package { 'squid':
ensure => latest,
}
service { 'squid':
ensure => running,
}
file { '/etc/squid/squid.conf':
ensure => file,
owner => 'root',
group => 'root',
mode => '0644',
content => epp('profiles/squid/squid.conf.epp',
{'acls' => $acls, 'http_access' => $http_access}
),
require => Package['squid'],
notify => Service['squid'],
}
}
|