summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
Diffstat (limited to 'manifests')
-rw-r--r--manifests/client.pp16
-rw-r--r--manifests/server.pp41
2 files changed, 57 insertions, 0 deletions
diff --git a/manifests/client.pp b/manifests/client.pp
new file mode 100644
index 00000000..049f740a
--- /dev/null
+++ b/manifests/client.pp
@@ -0,0 +1,16 @@
+# install squid-deb-proxy-client package
+class squid_deb_proxy::client {
+ package { 'squid-deb-proxy-client':
+ ensure => installed,
+ } ->
+
+ # ship newer client discover script than includes in squid-deb-proxy-client
+ # v. 0.8.13 to fix error messages being sent to stdout instead of stderr,
+ # see https://bugs.launchpad.net/ubuntu/+source/squid-deb-proxy/+bug/1505670
+ file { '/usr/share/squid-deb-proxy-client/apt-avahi-discover':
+ source => 'puppet:///modules/squid_deb_proxy/client/apt-avahi-discover',
+ mode => '0755',
+ owner => 'root',
+ group => 'root',
+ }
+}
diff --git a/manifests/server.pp b/manifests/server.pp
new file mode 100644
index 00000000..b6c3b2ed
--- /dev/null
+++ b/manifests/server.pp
@@ -0,0 +1,41 @@
+class squid_deb_proxy::server {
+ package { 'squid-deb-proxy':
+ ensure => installed,
+ }
+
+ service { 'squid-deb-proxy':
+ ensure => running,
+ hasstatus => false,
+ require => Package[ 'squid-deb-proxy' ],
+ }
+
+ file {'/etc/squid-deb-proxy/mirror-dstdomain.acl.d/20-custom':
+ source => [ 'puppet:///modules/site_squid_deb_proxy/mirror-dstdomain.acl.d/20-custom',
+ 'puppet:///modules/squid_deb_proxy/mirror-dstdomain.acl.d/20-custom' ],
+ notify => Service[ 'squid-deb-proxy' ],
+ require => Package[ 'squid-deb-proxy' ],
+ mode => '0644',
+ owner => 'root',
+ group => 'root',
+ }
+
+ file {'/etc/squid-deb-proxy/allowed-networks-src.acl.d/20-custom':
+ source => [ 'puppet:///modules/site_squid_deb_proxy/allowed-networks-src.acl.d/20-custom',
+ 'puppet:///modules/squid_deb_proxy/allowed-networks-src.acl.d/20-custom' ],
+ notify => Service[ 'squid-deb-proxy' ],
+ require => Package[ 'squid-deb-proxy' ],
+ mode => '0644',
+ owner => 'root',
+ group => 'root',
+ }
+
+ file { '/etc/squid-deb-proxy/squid-deb-proxy.conf':
+ source => [ "puppet:///modules/site_squid_deb_proxy/${::operatingsystem}/squid-deb-proxy.conf",
+ "puppet:///modules/squid_deb_proxy/${::operatingsystem}/squid-deb-proxy.conf" ],
+ notify => Service[ 'squid-deb-proxy' ],
+ require => Package[ 'squid-deb-proxy' ],
+ mode => '0644',
+ owner => 'root',
+ group => 'root',
+ }
+}