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:

Expand
表 26.1. Sample inventory files
Authorization optionInventory file

A random, one-time password (OTP) + administrator password

[ipaclients:vars]
ipaadmin_password=Secret123
ipaclient_use_otp=true

A random, one-time password (OTP)

[ipaclients:vars]
ipaclient_otp=<W5YpARl=7M.>

This scenario assumes that the OTP was already generated by an IdM admin before the installation.

A random, one-time password (OTP) + an admin keytab

[ipaclients:vars]
ipaadmin_keytab=/root/admin.keytab
ipaclient_use_otp=true

The client keytab from the previous enrollment

[ipaclients:vars]
ipaclient_keytab=/root/krb5.keytab

Password of an admin user stored in an inventory file

[ipaclients:vars]
ipaadmin_password=Secret123

Password of an admin user stored in an Ansible vault file

[ipaclients:vars]
[...]

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:

Expand
表 26.2. User password stored in an Ansible vault
Inventory filePlaybook file
[ipaclients:vars]
[...]
- name: Playbook to configure IPA clients
  hosts: ipaclients
  become: true
  vars_files:
  - ansible_vault_file.yml

  roles:
  - role: freeipa.ansible_freeipa.ipaclient
    state: present

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.

Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2026 Red Hat
返回顶部