community.general.ipa_otpconfig 模块 – 管理 FreeIPA OTP 配置设置
注意
此模块是 community.general 集合(版本 10.1.0)的一部分。
如果您使用的是 ansible 包,您可能已经安装了此集合。它不包含在 ansible-core 中。要检查是否已安装,请运行 ansible-galaxy collection list。
要安装它,请使用:ansible-galaxy collection install community.general。
要在 playbook 中使用它,请指定:community.general.ipa_otpconfig。
community.general 2.5.0 中的新功能
概要
- 修改 FreeIPA 服务器关于 OTP(一次性密码)的全局配置设置。 
参数
| 参数 | 注释 | 
|---|---|
| IPA 服务器的 IP 或主机名。 如果任务中未指定该值,则将使用环境变量  如果任务中既未指定环境变量  FreeIPA 中需要的相关条目是  如果任务中 DNS 条目、环境变量  默认值:  | |
| 管理用户的密码。 如果任务中未指定该值,则将使用环境变量  请注意,如果  如果环境变量  如果环境变量  如果 GSSAPI 不可用,则必须使用  | |
| FreeIPA/IPA 服务器的端口。 如果任务中未指定该值,则将使用环境变量  如果任务中既未指定环境变量  默认值:  | |
| IPA 服务器使用的协议。 如果任务中未指定该值,则将使用环境变量  如果任务中既未指定环境变量  选择 
 | |
| 指定连接的空闲超时时间(以秒为单位)。 对于批量操作,您可能需要增加此值,以避免来自 IPA 服务器的超时。 如果任务中未指定该值,则将使用环境变量  如果任务中既未指定环境变量  默认值:  | |
| 在 IPA 服务器上使用的管理帐户。 如果任务中未指定该值,则将使用环境变量  如果任务中既未指定环境变量  默认值:  | |
| HOTP 身份验证窗口,以跳数表示。 | |
| HOTP 同步窗口,以跳数表示。 | |
| TOTP 身份验证窗口,以秒为单位。 | |
| TOTP 同步窗口,以秒为单位。 | |
属性
| 属性 | 支持 | 描述 | 
|---|---|---|
| 支持:完全支持 | 可以在  | |
| 支持:不支持 | 当处于差异模式时,将返回已更改内容(或在  | 
示例
- name: Ensure the TOTP authentication window is set to 300 seconds
  community.general.ipa_otpconfig:
    ipatokentotpauthwindow: '300'
    ipa_host: localhost
    ipa_user: admin
    ipa_pass: supersecret
- name: Ensure the TOTP synchronization window is set to 86400 seconds
  community.general.ipa_otpconfig:
    ipatokentotpsyncwindow: '86400'
    ipa_host: localhost
    ipa_user: admin
    ipa_pass: supersecret
- name: Ensure the HOTP authentication window is set to 10 hops
  community.general.ipa_otpconfig:
    ipatokenhotpauthwindow: '10'
    ipa_host: localhost
    ipa_user: admin
    ipa_pass: supersecret
- name: Ensure the HOTP synchronization window is set to 100 hops
  community.general.ipa_otpconfig:
    ipatokenhotpsyncwindow: '100'
    ipa_host: localhost
    ipa_user: admin
    ipa_pass: supersecret
返回值
通用返回值记录在此处:此处,以下是此模块独有的字段
| 键 | 描述 | 
|---|---|
| IPA API 返回的 OTP 配置。 返回:始终 | 
