summaryrefslogtreecommitdiff
path: root/puppet/modules/squid_deb_proxy/manifests
diff options
context:
space:
mode:
authorMicah <micah@leap.se>2016-07-12 16:46:23 -0400
committerMicah <micah@leap.se>2016-07-12 16:46:23 -0400
commitd8a8d30b04d34387f309d9f5b7afdbcad01f7cbc (patch)
treebced624a7a7b28f17faa8c60a17cf16339a1a71a /puppet/modules/squid_deb_proxy/manifests
parenta658f5c30ada5e03468257f90d08f6cd2ba25488 (diff)
git subrepo clone https://leap.se/git/puppet_squid_deb_proxy puppet/modules/squid_deb_proxy
subrepo: subdir: "puppet/modules/squid_deb_proxy" merged: "08bfacc" upstream: origin: "https://leap.se/git/puppet_squid_deb_proxy" branch: "master" commit: "08bfacc" git-subrepo: version: "0.3.0" origin: "https://github.com/ingydotnet/git-subrepo" commit: "1e79595" Change-Id: I4afe250a7d95c927ee2c1e06f7efd6f733fefe29
Diffstat (limited to 'puppet/modules/squid_deb_proxy/manifests')
-rw-r--r--puppet/modules/squid_deb_proxy/manifests/client.pp16
-rw-r--r--puppet/modules/squid_deb_proxy/manifests/server.pp41
2 files changed, 57 insertions, 0 deletions
diff --git a/puppet/modules/squid_deb_proxy/manifests/client.pp b/puppet/modules/squid_deb_proxy/manifests/client.pp
new file mode 100644
index 00000000..049f740a
--- /dev/null
+++ b/puppet/modules/squid_deb_proxy/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/puppet/modules/squid_deb_proxy/manifests/server.pp b/puppet/modules/squid_deb_proxy/manifests/server.pp
new file mode 100644
index 00000000..b6c3b2ed
--- /dev/null
+++ b/puppet/modules/squid_deb_proxy/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',
+ }
+}