Lance Bragstad b10095c64e Safely recreate hosts if they're not enrolled
When we create hosts in IPA, we check to see if the keytab attribute of
the host is present. If it isn't, we assume the host isn't enrolled. We
should also check to make sure the host doesn't exist in FreeIPA. This
gives us the opportunity to clean up the existing host before attempting
to recreate it (and failing, or ignoring errors).

We need to recreate the host if it hasn't already been enrolled because
we need to know the OTP (given to us when we create the host) to enroll
the host as an IPA client later in the installation process.

This helps make tripleo-ipa more robust against host that are in a bad
state, where something went wrong on a previous deployment after the
host was created and before it was enrolled.

Change-Id: Ie31b2e49296563962d0c5985a13faf18a34f93da
2020-04-30 13:44:12 +00:00
..