Moved lsc into separate class

This commit is contained in:
Tobias Herre 2020-08-25 22:56:26 +02:00
parent 1e2f674116
commit 084a99d8f6
2 changed files with 45 additions and 40 deletions

View File

@ -3,14 +3,14 @@
class wmdeit_ldap ( class wmdeit_ldap (
$log_level = 0, $log_level = 0,
$configdn = 'cn=admin,cn=config', $configdn,
$configpw = '123', $configpw,
$syncrepl_providers = [ $syncrepl_providers = [
], ],
$database = "dc=wikimedia,dc=de", $database,
$rootdn = "cn=admin,dc=wikimedia,dc=de", $rootdn,
$rootpw = "123", $rootpw,
$serverid, $serverid,
$simple_bind_tls = "128", $simple_bind_tls = "128",
@ -135,11 +135,11 @@ class wmdeit_ldap (
creates => "/etc/ldap/wmde.managed", creates => "/etc/ldap/wmde.managed",
command => @(CMD/L), command => @(CMD/L),
/sbin/service slapd stop && /usr/sbin/service slapd stop &&
rm -rf '/etc/ldap/slapd.d/cn=config/cn=schema' && rm -rf '/etc/ldap/slapd.d/cn=config/cn=schema' &&
rm -rf '/etc/ldap/slapd.d/cn=config/cn=schema.ldif' && rm -rf '/etc/ldap/slapd.d/cn=config/cn=schema.ldif' &&
rm -rf '/etc/ldap/slapd.d/cn=config/olcDatabase={1}mdb.ldif' && rm -rf '/etc/ldap/slapd.d/cn=config/olcDatabase={1}mdb.ldif' &&
/sbin/service slapd start && /usr/sbin/service slapd start &&
touch /etc/ldap/wmde.managed touch /etc/ldap/wmde.managed
| CMD | CMD
} }
@ -237,39 +237,6 @@ class wmdeit_ldap (
# version => "8" # version => "8"
# } # }
# #
$java_home = "/usr/lib/jvm/jdk8u202-b08-jre"
java::adopt { 'jdk8' :
ensure => 'present',
version => '8',
java => 'jre',
} ->
apt::source { 'lsc':
location => 'http://lsc-project.org/debian',
repos => 'main',
release => 'lsc',
key => {
id => "3FC3FD92ABA3975D2BEB95A70AC51F926D45BFC5",
source => "https://ltb-project.org/lib/RPM-GPG-KEY-LTB-project",
}
} ->
package {"lsc":
ensure => installed
} ->
file {"/etc/default/lsc":
ensure => file,
content => template("wmdeit_ldap/lsc.erb")
} ->
file {"/etc/lsc/lsc.xml":
ensure => file,
content => template("wmdeit_ldap/lsc.xml.erb")
} ->
service {"lsc":
ensure => running,
subscribe => File["/etc/lsc/lsc.xml"],
}
# openldap::server::globalconf { 'TLSVerifyClient': # openldap::server::globalconf { 'TLSVerifyClient':
# ensure => present, # ensure => present,

38
manifests/lsc.pp Normal file
View File

@ -0,0 +1,38 @@
#
class wmdeit_ldap::lsc ()
inherits wmdeit_ldap
{
$java_home = "/usr/lib/jvm/jdk8u202-b08-jre"
java::adopt { 'jdk8' :
ensure => 'present',
version => '8',
java => 'jre',
} ->
apt::source { 'lsc':
location => 'http://lsc-project.org/debian',
repos => 'main',
release => 'lsc',
key => {
id => "3FC3FD92ABA3975D2BEB95A70AC51F926D45BFC5",
source => "https://ltb-project.org/lib/RPM-GPG-KEY-LTB-project",
}
} ->
package {"lsc":
ensure => installed
} ->
file {"/etc/default/lsc":
ensure => file,
content => template("wmdeit_ldap/lsc.erb")
} ->
file {"/etc/lsc/lsc.xml":
ensure => file,
content => template("wmdeit_ldap/lsc.xml.erb")
} ->
service {"lsc":
ensure => running,
subscribe => File["/etc/lsc/lsc.xml"],
}
}