fix ldap.conf for jessie hosts
authorStephen Gran <steve@lobefin.net>
Sun, 31 May 2015 14:33:26 +0000 (15:33 +0100)
committerStephen Gran <steve@lobefin.net>
Sun, 31 May 2015 14:38:46 +0000 (15:38 +0100)
Signed-off-by: Stephen Gran <steve@lobefin.net>
modules/debian-org/files/ldap.conf [deleted file]
modules/debian-org/manifests/init.pp
modules/debian-org/templates/ldap.conf.erb [new file with mode: 0644]

diff --git a/modules/debian-org/files/ldap.conf b/modules/debian-org/files/ldap.conf
deleted file mode 100644 (file)
index e60b6a9..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-##
-## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
-## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git
-##
-
-#
-# LDAP Defaults
-#
-
-# See ldap.conf(5) for details
-# This file should be world readable but not world writable.
-
-#BASE  dc=example,dc=com
-#URI   ldap://ldap.example.com ldap://ldap-master.example.com:666
-
-#SIZELIMIT     12
-#TIMELIMIT     15
-#DEREF         never
-
-URI             ldap://db.debian.org
-BASE            dc=debian,dc=org
-
-TLS_CACERT      /etc/ssl/servicecerts/db.debian.org.crt
-TLS_REQCERT     hard
index 8b0d62b..2c295df 100644 (file)
@@ -283,7 +283,7 @@ class debian-org {
        }
        file { '/etc/ldap/ldap.conf':
                require => Package['debian.org'],
-               source  => 'puppet:///modules/debian-org/ldap.conf',
+               content  => template('debian-org/ldap.conf.erb'),
        }
        file { '/etc/pam.d/common-session':
                require => Package['debian.org'],
diff --git a/modules/debian-org/templates/ldap.conf.erb b/modules/debian-org/templates/ldap.conf.erb
new file mode 100644 (file)
index 0000000..1a6828d
--- /dev/null
@@ -0,0 +1,28 @@
+##
+## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
+## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git
+##
+
+#
+# LDAP Defaults
+#
+
+# See ldap.conf(5) for details
+# This file should be world readable but not world writable.
+
+#BASE  dc=example,dc=com
+#URI   ldap://ldap.example.com ldap://ldap-master.example.com:666
+
+#SIZELIMIT     12
+#TIMELIMIT     15
+#DEREF         never
+
+URI             ldap://db.debian.org
+BASE            dc=debian,dc=org
+
+<% if @lsbmajdistrelease >= 8 -%>
+TLS_CACERT      /etc/ssl/ca-debian/ca-certificates.crt
+<% else -%>
+TLS_CACERT      /etc/ssl/servicecerts/db.debian.org.crt
+<% end -%>
+TLS_REQCERT     hard