26.4. Authorization options for IdM client enrollment using an Ansible playbook
You can authorize IdM client enrollment by using any of the following methods:
- A random, one-time password (OTP) + administrator password
- A random, one-time password (OTP) + an admin keytab
- The client keytab from the previous enrollment
-
The password of a user authorized to enroll a client (
admin) stored in an inventory file -
The password of a user authorized to enroll a client (
admin) stored in an Ansible vault
It is possible to have the OTP generated by an IdM administrator before the IdM client installation. In that case, you do not need any credentials for the installation other than the OTP itself.
The following are sample inventory files for these methods:
| Authorization option | Inventory file |
|---|---|
| A random, one-time password (OTP) + administrator password |
|
| A random, one-time password (OTP) |
This scenario assumes that the OTP was already generated by an IdM |
| A random, one-time password (OTP) + an admin keytab |
|
| The client keytab from the previous enrollment |
|
|
Password of an |
|
|
Password of an |
|
If you are using the password of an admin user stored in an Ansible vault file, the corresponding playbook file must have an additional vars_files directive:
| Inventory file | Playbook file |
|---|---|
|
|
In all the other authorization scenarios described above, a basic playbook file could look as follows:
- name: Playbook to configure IPA clients
hosts: ipaclients
become: true
roles:
- role: freeipa.ansible_freeipa.ipaclient
state: true
In the two OTP authorization scenarios described above, the requesting of the administrator’s TGT by using the kinit command occurs on the first specified or discovered IdM server. Therefore, no additional modification of the Ansible control node is required.