Thanks for the procedure, may be this post will help people who want to delete node from rudder.
ldapdelete -D cn=Manager,cn=rudder-configuration -x nodeId=${NODEID},ou=nodes,cn=rudder-configuration -W
ldapdelete -r -D cn=Manager,cn=rudder-configuration -x nodeId=${NODEID},ou="nodes configuration",ou=rudder,cn=rudder-configuration -W
the third step you should search each object which has your node:
ldapsearch -D cn=Manager,cn=rudder-configuration -b groupCategoryId=GroupRudder,ou=rudder,cn=rudder-configiration -W "(nodeId=${NODEID})"
retrieve each dn results and create a file (to_remove) as following:
dn: ${DN_RETRIEVED_BY_COMMAND}
changetype: modify
delete: nodeId
nodeId: ${NODEID}
Next lunch:
ldapmodify -D cn=Manager,cn=rudder-configuration -f to_remove.txt
Finally, remove all inventory informations:
ldapdelete -r -D cn=Manager,cn=rudder-configuration -x nodeId=${NODEID},ou="accepted inventories",ou=inventories,cn=rudder-configuration
P.S: Replace ${NODEID}
by your nodeId.