Compare commits
3 Commits
a2ca71146b
...
084a99d8f6
Author | SHA1 | Date |
---|---|---|
Tobias Herre | 084a99d8f6 | |
Tobias Herre | 1e2f674116 | |
Tobias Herre | 527d69ee87 |
17
README.md
17
README.md
|
@ -1,4 +1,4 @@
|
||||||
# puppet-wmdeit_ldap
|
# puppet-wmdeit\_ldap
|
||||||
|
|
||||||
A puppet module to configure our OpenLDAP servers
|
A puppet module to configure our OpenLDAP servers
|
||||||
|
|
||||||
|
@ -6,18 +6,31 @@ To get it running:
|
||||||
|
|
||||||
puppet module install camptocamp-openldap
|
puppet module install camptocamp-openldap
|
||||||
|
|
||||||
|
For lsc
|
||||||
|
puppet module install puppetlabs-java
|
||||||
|
puppet module install puppetlabs-apt
|
||||||
|
puppet generate types
|
||||||
|
|
||||||
For LAM
|
For LAM
|
||||||
|
|
||||||
puppet module install puppetlabs-apache
|
puppet module install puppetlabs-apache
|
||||||
puppet module install puppet-php
|
puppet module install puppet-php
|
||||||
|
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
class {"wmdeit_ldap":
|
class {"wmdeit_ldap":
|
||||||
serverid => 17,
|
serverid => 17,
|
||||||
simple_bind_tls => "0",
|
simple_bind_tls => "0",
|
||||||
log_level => 4,
|
log_level => 4,
|
||||||
|
|
||||||
|
# password for cn=config
|
||||||
|
configdn => "nc=admin,nc=config",
|
||||||
|
configpw => "123",
|
||||||
|
|
||||||
|
# database with rootdn and rootpw
|
||||||
|
database => "dc=wikimedia,dc=de",
|
||||||
|
rootdn => "cn=admin,dc=wikimedia,dc=de",
|
||||||
|
rootpw => "123",
|
||||||
}
|
}
|
||||||
|
|
||||||
class {"wmdeit_ldap::lam":
|
class {"wmdeit_ldap::lam":
|
||||||
|
|
|
@ -3,6 +3,8 @@ use \LAM\TYPES\TypeManager;
|
||||||
use function LAM\TYPES\getScopeFromTypeId;
|
use function LAM\TYPES\getScopeFromTypeId;
|
||||||
use LAM\TYPES\ConfiguredType;
|
use LAM\TYPES\ConfiguredType;
|
||||||
|
|
||||||
|
include_once "posixGroup.inc";
|
||||||
|
|
||||||
class wmdeGroup extends posixGroup
|
class wmdeGroup extends posixGroup
|
||||||
{
|
{
|
||||||
function display_html_attributes() {
|
function display_html_attributes() {
|
||||||
|
|
|
@ -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,
|
||||||
|
|
|
@ -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"],
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue