mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-03-26 21:33:05 +00:00
roles/ipaclient/tasks/install.yml: Set default principal if not set
If use_otp is not enabled, then the principal will be set to "admin" after the discovery has been done. If use_otp is enabled, then the princial will be set to "admin" after the join has been done - as admin will not match with the otp.
This commit is contained in:
@@ -16,6 +16,11 @@
|
||||
check: yes
|
||||
register: ipadiscovery
|
||||
|
||||
- name: Install - Set default principal if no keytab is given and no OTP usage
|
||||
set_fact:
|
||||
ipaclient_principal: admin
|
||||
when: ipaclient_principal is undefined and ipaclient_keytab is undefined and not ipaclient_use_otp | bool
|
||||
|
||||
# The following block is executed when using OTP to enroll IPA client
|
||||
# ie when ipaclient_use_otp is set.
|
||||
# It connects to ipaserver and add the host with --random option in order
|
||||
@@ -125,6 +130,11 @@
|
||||
#debug: yes
|
||||
register: ipaapi
|
||||
|
||||
- name: Install - Set default principal after OTP usage
|
||||
set_fact:
|
||||
ipaclient_principal: admin
|
||||
when: ipaclient_principal is undefined and ipaclient_keytab is undefined and ipaclient_use_otp | bool
|
||||
|
||||
- name: Install - Create IPA NSS database
|
||||
ipanss:
|
||||
servers: "{{ ipadiscovery.servers }}"
|
||||
|
||||
Reference in New Issue
Block a user