mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-07-31 20:04:45 +00:00
library/ipajoin.py: Fix principal usage with otp
With otp usage the user supplied principal may not be used for join.
This commit is contained in:
@@ -231,7 +231,7 @@ def main():
|
|||||||
|
|
||||||
options.ca_cert_file = ca_cert_file
|
options.ca_cert_file = ca_cert_file
|
||||||
options.unattended = True
|
options.unattended = True
|
||||||
options.principal = principal
|
options.principal = principal if principal != "" else None
|
||||||
options.force = False
|
options.force = False
|
||||||
options.password = password
|
options.password = password
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
when: ipaclient_password is undefined and ipaclient_keytab is undefined or ipaclient_password == "" or ipaclient_keytab == ""
|
||||||
|
|
||||||
- name: Install - Join IPA
|
- name: Install - Join IPA
|
||||||
ipajoin:
|
ipajoin:
|
||||||
@@ -66,7 +66,7 @@
|
|||||||
basedn: "{{ ipadiscovery.basedn }}"
|
basedn: "{{ ipadiscovery.basedn }}"
|
||||||
hostname: "{{ ipadiscovery.hostname }}"
|
hostname: "{{ ipadiscovery.hostname }}"
|
||||||
force_join: "{{ ipaclient_force_join | default(omit) }}"
|
force_join: "{{ ipaclient_force_join | default(omit) }}"
|
||||||
principal: "{{ ipaclient_principal | default(omit) }}"
|
principal: "{{ ipaclient_principal if not ipaclient_use_otp | bool else '' }}"
|
||||||
password: "{{ ipaclient_password | default(omit) }}"
|
password: "{{ ipaclient_password | default(omit) }}"
|
||||||
keytab: "{{ ipaclient_keytab | default(omit) }}"
|
keytab: "{{ ipaclient_keytab | default(omit) }}"
|
||||||
#ca_cert_file: "{{ ipaclient_ca_cert_file | default(omit) }}"
|
#ca_cert_file: "{{ ipaclient_ca_cert_file | default(omit) }}"
|
||||||
|
|||||||
Reference in New Issue
Block a user