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

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.
parent fd88ba1c
No related branches found
No related tags found
No related merge requests found
......@@ -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 }}"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment