]> git.donarmstrong.com Git - dsa-puppet.git/commitdiff
probably break a couple of release dependent templates
authorPeter Palfrader <peter@palfrader.org>
Sun, 6 Nov 2011 09:42:31 +0000 (10:42 +0100)
committerPeter Palfrader <peter@palfrader.org>
Sun, 6 Nov 2011 09:42:31 +0000 (10:42 +0100)
modules/buildd/templates/etc/apt/sources.list.d/buildd.list.erb
modules/debian-org/templates/pam.common-session.erb
modules/monit/templates/default.erb
modules/monit/templates/monitrc.erb
modules/nagios/templates/nrpe.cfg.erb
modules/samhain/templates/samhainrc.erb
modules/ssh/templates/sshd_config.erb

index b5d686aedf34e772e569b38382fbd40058ec6eeb..9052798769ac85bb17bca9ba5feb6bdac9675051 100644 (file)
@@ -3,31 +3,22 @@
 ## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git
 ##
 
+<%
+  builddsuites = %w{lenny squeeze wheezy}
+  testingunstable = 'wheezy'
+  if builddsuites.include?(lsbdistcodename)
+    suite = lsbdistcodename
+  else
+    suite = testingunstable
+  end
+%>
+
 # The buildd default repository.
-<% if nodeinfo.has_key?('squeeze') and nodeinfo['squeeze'] %>
-deb https://buildd.debian.org/apt/ squeeze main
-<% elsif nodeinfo.has_key?('wheezy') and nodeinfo['wheezy'] %>
-deb https://buildd.debian.org/apt/ wheezy main
-<% else %>
-deb https://buildd.debian.org/apt/ lenny main
-<% end %>
+deb https://buildd.debian.org/apt/ <%= suite %> main
 
 <% if %w{alkman porpora zandonai}.include?(hostname) -%>
-
 # Include the current test version too.
-<% if nodeinfo.has_key?('squeeze') and nodeinfo['squeeze'] %>
-deb https://buildd.debian.org/apt/ squeeze-proposed main
-<% else %>
-deb https://buildd.debian.org/apt/ lenny-proposed main
-<% end %>
-
+deb https://buildd.debian.org/apt/ <%= suite %>-proposed main
 <% elsif %w{krenek}.include?(hostname) -%>
-
-# The buildd bleeding edge repository.
-<% if nodeinfo.has_key?('squeeze') and nodeinfo['squeeze'] %>
-deb https://buildd.debian.org/apt/ squeeze-experimental main
-<% else %>
-deb https://buildd.debian.org/apt/ lenny-experimental main
-<% end %>
-
+deb https://buildd.debian.org/apt/ <%= suite %>-experimental main
 <% end %>
index be993435a1d6ce633f2cf9adc839e02d3e312db6..07c4fdf0fa1fe2d36f2beccb25888f3ce4e91616 100644 (file)
@@ -3,7 +3,7 @@
 ## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git
 ##
 
-<% if (nodeinfo.has_key?('squeeze') and nodeinfo['squeeze']) or (nodeinfo.has_key?('wheezy') and nodeinfo['wheezy']) %>
+<% unless lsbdistcodename == 'lenny' %>
 #
 # /etc/pam.d/common-session - session-related modules common to all services
 #
index 15a0ba07c41b9623ec4ba591aee53c6d5eae5ab8..c2c53ecbef7b634f23759b55fc2d87cc920364e6 100644 (file)
@@ -11,7 +11,7 @@
 # You must set this variable to for monit to start
 startup=0
 
-<% unless (nodeinfo.has_key?('squeeze') and nodeinfo['squeeze']) or (nodeinfo.has_key?('wheezy') and nodeinfo['wheezy']) %>
+<% if lsbdistcodename == 'lenny' %>
 
 # To change the intervals which monit should run uncomment
 # and change this variable.
index 727e3aec965c7a99697c5ad5a2cfde373d7f9cd9..41cff1650b26ec895d150fb810f10522d614c0c1 100644 (file)
@@ -21,7 +21,7 @@
 ## Start monit in the background (run as a daemon) and check services at 
 ## 2-minute intervals.
 #
-<% if (nodeinfo.has_key?('squeeze') and nodeinfo['squeeze']) or (nodeinfo.has_key?('wheezy') and nodeinfo['wheezy']) %>
+<% unless lsbdistcodename == 'lenny' %>
 set daemon 300
 <% end %>
 #
index 67edbb307ae5a0726c739601325ffeed79cd24df..97a1d9b8af73875cccd4b38e755408c89a5288ce 100644 (file)
@@ -27,7 +27,7 @@ log_facility=daemon
 # number.  The file is only written if the NRPE daemon is started by the root
 # user and is running in standalone mode.
 
-<% if (nodeinfo.has_key?('squeeze') and nodeinfo['squeeze']) or (nodeinfo.has_key?('wheezy') and nodeinfo['wheezy']) %>
+<% unless lsbdistcodename == 'lenny' %>
 pid_file=/var/run/nagios/nrpe.pid
 <% else %>
 pid_file=/var/run/nrpe.pid
index 24e6478fdbb19e1e6d18cc9c3df0d1c1756532c5..e36f484c7d0fdcdca5ccb7d20b5fd506139f7b63 100644 (file)
@@ -147,7 +147,7 @@ file=/etc/ferm/
 file=/etc/ferm/conf.d
 file=/etc/ferm/dsa.d
 file=/etc/rc.local
-<% if (nodeinfo.has_key?('squeeze') and nodeinfo['squeeze']) or (nodeinfo.has_key?('wheezy') and nodeinfo['wheezy']) %>
+<% unless lsbdistcodename == 'lenny' %>
 file=/etc/unbound
 <% end -%>
 file=/etc/dsa
@@ -399,7 +399,7 @@ file=/etc/ferm/conf.d/me.conf
 file=/etc/ferm/conf.d/defs.conf
 file=/etc/ferm/ferm.conf
 dir=2/etc/ssl/debian
-<% if (nodeinfo.has_key?('squeeze') and nodeinfo['squeeze']) or (nodeinfo.has_key?('wheezy') and nodeinfo['wheezy']) %>
+<% unless lsbdistcodename == 'lenny' %>
 file=/etc/unbound/unbound.conf
 <% end -%>
 
index 0bc6efb7d6b5c0461a0b538cdd55cdc38ecbde97..93b39c5f374f617bb8afd3bf1aff0a45c0eb0bc7 100644 (file)
@@ -76,10 +76,10 @@ AcceptEnv LANG LC_*
 Subsystem sftp /usr/lib/openssh/sftp-server
 
 UsePAM yes
-<% if nodeinfo.has_key?('wheezy') and nodeinfo['wheezy'] %>
-AuthorizedKeysFile /etc/ssh/userkeys/%u /var/lib/misc/userkeys/%u
-<% else %>
+<% if %w{lenny squeeze}.include?(lsbdistcodename) %>
 AuthorizedKeysFile /etc/ssh/userkeys/%u
 AuthorizedKeysFile2 /var/lib/misc/userkeys/%u
+<% else %>
+AuthorizedKeysFile /etc/ssh/userkeys/%u /var/lib/misc/userkeys/%u
 <% end %>
 PasswordAuthentication no