Sets admin password now when installing
This commit is contained in:
parent
44a5e3f3f1
commit
f7dfb493ca
|
@ -62,6 +62,7 @@ define plnxtools::apacheds::instance(
|
|||
$ensure = running,
|
||||
$ldap_port = 10389,
|
||||
$ldaps_port = 10638,
|
||||
$admin_password = "secret",
|
||||
$partitionsuffix,
|
||||
$partitionid
|
||||
|
||||
|
@ -113,6 +114,14 @@ define plnxtools::apacheds::instance(
|
|||
stop => "$bin_dir/apacheds.sh $title stop",
|
||||
status => "$bin_dir/apacheds.sh $title status | grep 'is running'",
|
||||
ensure => $ensure,
|
||||
}->
|
||||
exec{"set_passwd":
|
||||
# To sleep 20 secs is an ugly hack, better would be to wait somehow
|
||||
# til the port is ready
|
||||
command => "/bin/sleep 30 && /usr/bin/printf \
|
||||
'dn: uid=admin,ou=system\nchangetype: modify\nreplace: userPassword\nuserPassword: $admin_password'\
|
||||
| ldapmodify -c -h localhost -p $ldap_port -D uid=admin,ou=system -w secret",
|
||||
creates => "$ads_instances/$title/conf/config.ldif_migrated"
|
||||
}
|
||||
}
|
||||
else{
|
||||
|
|
Loading…
Reference in New Issue