Skip to content
Snippets Groups Projects
Commit 2372e5b9 authored by Thomas Woerner's avatar Thomas Woerner
Browse files

ipaclient: Report error message if ipaclient_get_otp failed

Currently the error message of ipaclient_get_otp is not visble if it failed
due to the use of no_log. The no_log option is needed and useful if the
one-time password has successfully been generated, but is bad if there was
an error while generating the password, for example if a clock skew has been
detected.

There is now a new task to print the error message if ipaclient_get_otp. The
task for ipaclient_get_otp has been marked with "ignore_errors: yes" and
the new task "Install - Report error for OTP generation" will always fail
and only be used if result_ipaclient_get_otp is failed.
parent 50046a73
No related branches found
No related tags found
No related merge requests found
...@@ -129,6 +129,13 @@ ...@@ -129,6 +129,13 @@
in result_ipaclient_get_otp.msg in result_ipaclient_get_otp.msg
delegate_to: "{{ result_ipaclient_test.servers[0] }}" delegate_to: "{{ result_ipaclient_test.servers[0] }}"
delegate_facts: yes delegate_facts: yes
ignore_errors: yes
- name: Install - Report error for OTP generation
debug:
msg: "{{ result_ipaclient_get_otp.msg }}"
when: result_ipaclient_get_otp is failed
failed_when: yes
- name: Install - Store the previously obtained OTP - name: Install - Store the previously obtained OTP
no_log: yes no_log: yes
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment