freeipa / ansible-freeipa

Ansible roles and modules for FreeIPA
GNU General Public License v3.0
482 stars 230 forks source link

ipaclient: Fix OTP error reporting #1187

Closed rjeffman closed 7 months ago

rjeffman commented 7 months ago

When deploying an IPA client with ipaclient, if an error occured while getting an OTP, no error message is logged, as the task that logs the error is not excuted due to the previous taks failure.

By adding a 'rescue' section to the code block and moving the error reporting to this new section, we ensure that the proper error messages will be reported.

Fixes #1182