Clean freeipa from spurious hosts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 | |
D='redhat.local' | |
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