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

ipaclient/tasks/install.yml: Save and restore ipaadmin_password with OTP

The generated OTP password is stored into ipaadmin_password. The original
password is now saved and restored later on again.

This fixes the failure with incorrect password while installing the client
part in a replica deployment.
parent be04079f
No related branches found
No related tags found
No related merge requests found
...@@ -138,6 +138,7 @@ ...@@ -138,6 +138,7 @@
- name: Install - Store the previously obtained OTP - name: Install - Store the previously obtained OTP
no_log: yes no_log: yes
set_fact: set_fact:
ipaadmin_orig_password: "{{ ipaadmin_password }}"
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 }}"
...@@ -347,6 +348,12 @@ ...@@ -347,6 +348,12 @@
not ipaclient_allow_repair | bool and not ipaclient_force_join | bool) not ipaclient_allow_repair | bool and not ipaclient_force_join | bool)
always: always:
- name: Install - Restore original admin password if overwritten by OTP
no_log: yes
set_fact:
ipaadmin_password: "{{ ipaadmin_orig_password }}"
when: ipaclient_use_otp | bool and ipaadmin_orig_password is defined
- name: Cleanup leftover ccache - name: Cleanup leftover ccache
file: file:
path: "/etc/ipa/.dns_ccache" path: "/etc/ipa/.dns_ccache"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment