Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Clean freeipa from spurious hosts
# To delete all hosts that are not freeipa and undercloud
# Go to freeipa-0 and open /tmp/freeipa-setup.env
# look for AdminPassword
kinit admin
# Type in AdminPassword
for i in $(ipa host-find |grep 'Host name:' | awk '{ print $3 }' | grep -v -e freeipa-0 -e undercloud-0 -e "ctlplane.$D" -e "$D" -e "internalapi.$D" -e "storage.$D" -e "storagemgmt.$D"); do ipa host-del "$i"; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment