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,
|
$ensure = running,
|
||||||
$ldap_port = 10389,
|
$ldap_port = 10389,
|
||||||
$ldaps_port = 10638,
|
$ldaps_port = 10638,
|
||||||
|
$admin_password = "secret",
|
||||||
$partitionsuffix,
|
$partitionsuffix,
|
||||||
$partitionid
|
$partitionid
|
||||||
|
|
||||||
|
@ -113,7 +114,15 @@ define plnxtools::apacheds::instance(
|
||||||
stop => "$bin_dir/apacheds.sh $title stop",
|
stop => "$bin_dir/apacheds.sh $title stop",
|
||||||
status => "$bin_dir/apacheds.sh $title status | grep 'is running'",
|
status => "$bin_dir/apacheds.sh $title status | grep 'is running'",
|
||||||
ensure => $ensure,
|
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{
|
else{
|
||||||
$bin_dir = "${plnxtools::apacheds::opt_dir}/${plnxtools::apacheds::appname}/bin"
|
$bin_dir = "${plnxtools::apacheds::opt_dir}/${plnxtools::apacheds::appname}/bin"
|
||||||
|
|
Loading…
Reference in New Issue