summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sitemodules/profiles/files/apt_sources_debian_testing.list3
-rw-r--r--sitemodules/profiles/files/sniproxy/sniproxy_apt_preferences7
-rw-r--r--sitemodules/profiles/manifests/base.pp2
-rw-r--r--sitemodules/profiles/manifests/sniproxy.pp49
-rw-r--r--sitemodules/roles/manifests/proxyin.pp1
5 files changed, 61 insertions, 1 deletions
diff --git a/sitemodules/profiles/files/apt_sources_debian_testing.list b/sitemodules/profiles/files/apt_sources_debian_testing.list
new file mode 100644
index 0000000..8577e7d
--- /dev/null
+++ b/sitemodules/profiles/files/apt_sources_debian_testing.list
@@ -0,0 +1,3 @@
+# THIS FILE IS MANAGED BY PUPPET, MANUAL CHANGES WILL BE OVERWRITTEN AT THE
+# NEXT PUPPET RUN.
+deb http://ftp.nl.debian.org/debian testing main
diff --git a/sitemodules/profiles/files/sniproxy/sniproxy_apt_preferences b/sitemodules/profiles/files/sniproxy/sniproxy_apt_preferences
new file mode 100644
index 0000000..a3c166d
--- /dev/null
+++ b/sitemodules/profiles/files/sniproxy/sniproxy_apt_preferences
@@ -0,0 +1,7 @@
+Package: *
+Pin: release o=Debian,a=testing
+Pin-Priority: 200
+
+Package: sniproxy
+Pin: release o=Debian,a=testing
+Pin-Priority: 450
diff --git a/sitemodules/profiles/manifests/base.pp b/sitemodules/profiles/manifests/base.pp
index d67fff6..c297ac1 100644
--- a/sitemodules/profiles/manifests/base.pp
+++ b/sitemodules/profiles/manifests/base.pp
@@ -28,7 +28,7 @@
# Copyright
# ---------
#
-# Copyright 2016 Jan Dittberner
+# Copyright 2016-2017 Jan Dittberner
#
class profiles::base (
Array[String] $admins = [],
diff --git a/sitemodules/profiles/manifests/sniproxy.pp b/sitemodules/profiles/manifests/sniproxy.pp
new file mode 100644
index 0000000..9e40507
--- /dev/null
+++ b/sitemodules/profiles/manifests/sniproxy.pp
@@ -0,0 +1,49 @@
+# Class: profiles::sniproxy
+# =========================
+#
+# This class takes care if setting up SNIProxy.
+#
+# Parameters
+# ----------
+#
+# -
+#
+# Examples
+# --------
+#
+# @example
+# class roles::myhost {
+# include profiles::sniproxy
+# }
+#
+# Authors
+# -------
+#
+# Jan Dittberner <jandd@cacert.org>
+#
+# Copyright
+# ---------
+#
+# Copyright 2017 Jan Dittberner
+#
+class profiles::sniproxy {
+ file { '/etc/apt/sources.list.d/puppetlabs-pc1.list':
+ ensure => file,
+ owner => 'root',
+ group => 'root',
+ mode => '0644',
+ source => 'puppet:///modules/profiles/apt_sources_debian_testing.list',
+ }
+
+ file { '/etc/apt/preferences.d/sniproxy':
+ ensure => file,
+ owner => 'root',
+ group => 'root',
+ mode => '0644',
+ source => 'puppet:///modules/profiles/sniproxy/sniproxy_apt_preferences',
+ }
+
+ package { 'sniproxy':
+ ensure => present,
+ }
+}
diff --git a/sitemodules/roles/manifests/proxyin.pp b/sitemodules/roles/manifests/proxyin.pp
index daab60a..d495a41 100644
--- a/sitemodules/roles/manifests/proxyin.pp
+++ b/sitemodules/roles/manifests/proxyin.pp
@@ -22,4 +22,5 @@
#
class roles::proxyin {
include profiles::base
+ include profiles::sniproxy
}