Add profile for SNIProxy
authorJan Dittberner <jandd@cacert.org>
Sat, 26 Aug 2017 18:06:54 +0000 (20:06 +0200)
committerJan Dittberner <jandd@cacert.org>
Sat, 26 Aug 2017 18:06:54 +0000 (20:06 +0200)
sitemodules/profiles/files/apt_sources_debian_testing.list [new file with mode: 0644]
sitemodules/profiles/files/sniproxy/sniproxy_apt_preferences [new file with mode: 0644]
sitemodules/profiles/manifests/base.pp
sitemodules/profiles/manifests/sniproxy.pp [new file with mode: 0644]
sitemodules/roles/manifests/proxyin.pp

diff --git a/sitemodules/profiles/files/apt_sources_debian_testing.list b/sitemodules/profiles/files/apt_sources_debian_testing.list
new file mode 100644 (file)
index 0000000..8577e7d
--- /dev/null
@@ -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 (file)
index 0000000..a3c166d
--- /dev/null
@@ -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
index d67fff6..c297ac1 100644 (file)
@@ -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 (file)
index 0000000..9e40507
--- /dev/null
@@ -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,
+  }
+}
index daab60a..d495a41 100644 (file)
@@ -22,4 +22,5 @@
 #
 class roles::proxyin {
   include profiles::base
+  include profiles::sniproxy
 }