mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-07-31 03:44:41 +00:00
Merge pull request #1187 from rjeffman/ipaclient_fix_otp_error_report
ipaclient: Fix OTP error reporting
This commit is contained in:
@@ -166,18 +166,19 @@
|
|||||||
register: result_ipaclient_get_otp
|
register: result_ipaclient_get_otp
|
||||||
delegate_to: "{{ result_ipaclient_test.servers[0] }}"
|
delegate_to: "{{ result_ipaclient_test.servers[0] }}"
|
||||||
|
|
||||||
- name: Install - Report error for OTP generation
|
|
||||||
ansible.builtin.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
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
ipaadmin_orig_password: "{{ ipaadmin_password | default(omit) }}"
|
ipaadmin_orig_password: "{{ ipaadmin_password | default(omit) }}"
|
||||||
ipaadmin_password: "{{ result_ipaclient_get_otp.host.randompassword
|
ipaadmin_password: "{{ result_ipaclient_get_otp.host.randompassword
|
||||||
if result_ipaclient_get_otp.host is defined }}"
|
if result_ipaclient_get_otp.host is defined }}"
|
||||||
|
rescue:
|
||||||
|
- name: Install - Report error for OTP generation
|
||||||
|
ansible.builtin.debug:
|
||||||
|
msg: "{{ result_ipaclient_get_otp.msg }}"
|
||||||
|
when: result_ipaclient_get_otp is failed
|
||||||
|
failed_when: yes
|
||||||
|
|
||||||
always:
|
always:
|
||||||
- name: Install - Remove keytab temporary file
|
- name: Install - Remove keytab temporary file
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
|
|||||||
Reference in New Issue
Block a user