Skip to content
Snippets Groups Projects
Unverified Commit 81e6cbe6 authored by Thomas Woerner's avatar Thomas Woerner Committed by GitHub
Browse files

Merge pull request #1187 from rjeffman/ipaclient_fix_otp_error_report

ipaclient: Fix OTP error reporting
parents 9ecbe231 22214daf
No related branches found
No related tags found
No related merge requests found
...@@ -166,18 +166,19 @@ ...@@ -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:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment