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

roles/ipaclient/tasks/install.yml: Fix principal/keytab check, set default principle early

parent 945da712
No related branches found
No related tags found
No related merge requests found
...@@ -16,10 +16,10 @@ ...@@ -16,10 +16,10 @@
check: yes check: yes
register: ipadiscovery register: ipadiscovery
- name: Install - Set default principal if no keytab is given and no OTP usage - name: Install - Set default principal if no keytab is given
set_fact: set_fact:
ipaclient_principal: admin ipaclient_principal: admin
when: ipaclient_principal is undefined and ipaclient_keytab is undefined and not ipaclient_use_otp | bool when: ipaclient_principal is undefined and ipaclient_keytab is undefined
# The following block is executed when using OTP to enroll IPA client # The following block is executed when using OTP to enroll IPA client
# ie when ipaclient_use_otp is set. # ie when ipaclient_use_otp is set.
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
- name: Install - Check if one of password and keytab are set - name: Install - Check if one of password and keytab are set
fail: msg="At least one of password or keytab must be specified" fail: msg="At least one of password or keytab must be specified"
when: ipaclient_password is undefined and ipaclient_keytab is undefined or ipaclient_password == "" or ipaclient_keytab == "" when: (ipaclient_password is undefined or ipaclient_password == "") and (ipaclient_keytab is undefined or ipaclient_keytab == "")
- name: Install - Join IPA - name: Install - Join IPA
ipajoin: ipajoin:
...@@ -130,11 +130,6 @@ ...@@ -130,11 +130,6 @@
#debug: yes #debug: yes
register: ipaapi 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 - name: Install - Create IPA NSS database
ipanss: ipanss:
servers: "{{ ipadiscovery.servers }}" servers: "{{ ipadiscovery.servers }}"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment