dellemc.openmanage.idrac_license 模块 – 配置 iDRAC 许可证
注意
此模块是 dellemc.openmanage 集合(版本 9.9.0)的一部分。
如果您正在使用 ansible 包,您可能已经安装了此集合。它不包含在 ansible-core 中。要检查是否已安装,请运行 ansible-galaxy collection list。
要安装它,请使用:ansible-galaxy collection install dellemc.openmanage。您需要其他要求才能使用此模块,请参阅要求了解详细信息。
要在 playbook 中使用它,请指定:dellemc.openmanage.idrac_license。
dellemc.openmanage 8.7.0 中的新增功能
概要
- 此模块允许在 iDRAC 上导入、导出和删除许可证。 
要求
执行此模块的主机需要以下要求。
- python >= 3.9.6 
参数
| 参数 | 注释 | 
|---|---|
| 包含用于验证的 CA 证书的隐私增强邮件 (PEM) 文件。 | |
| 从 iDRAC 删除许可证。 当 *delete* 为  *delete* 与 *export* 和 *import* 互斥。 选择 
 | |
| 从 iDRAC 导出许可证。 当 *export* 为  *export* 与 *delete* 和 *import* 互斥。 选择 
 | |
| iDRAC IP 地址。 | |
| iDRAC 用户密码。 如果未提供密码,则使用环境变量  示例:export IDRAC_PASSWORD=password | |
| iDRAC 端口。 默认值:  | |
| iDRAC 用户名。 如果未提供用户名,则使用环境变量  示例:export IDRAC_USERNAME=username | |
| 从 iDRAC 导入许可证。 当 *import* 为  *import* 与 *delete* 和 *export* 互斥。 选择 
 | |
| 要导入、导出或删除的许可证的授权 ID。 当 *delete* 为  | |
| 资源的 ID。 如果未提供资源 ID 的值,则模块将从 iDRAC 返回的系统资源列表中选择第一个可用的资源 ID。 | |
| 许可证导入和导出操作所需的参数。 当 *export* 或 *import* 为  | |
| 用于 *import* 和 *export* 操作的许可证文件名。 当 *import* 为  对于 *import* 操作,当 *share_type* 为  | |
| 忽略连接到共享时的证书警告,仅当 *share_type* 为  
 
 选择 
 | |
| 网络共享的 IP 地址。 当 share_type 为  | |
| 网络共享的密码。 当 share_type 为  | |
| 代理服务器的密码。 当 share_type 为  | |
| 代理服务器的端口。 当 share_type 为  默认值:  | |
| 代理服务器的 IP 地址。 当 proxy_support 为  当 share_type 为  | |
| 指定是否使用代理。 
 
 
 proxy_support 仅在 share_type 为  选择 
 | |
| 代理服务器的代理类型。 
 
 当 share_type 为  选择 
 | |
| 代理服务器的用户名。 当 share_type 为  | |
| 许可证文件的网络共享或本地路径。 | |
| 网络共享的共享类型。 
 
 
 
 
 选择 
 | |
| 网络共享的用户名。 当 share_type 为  | |
| 网络共享的工作组。 当 share_type 为  | |
| 套接字级别的超时时间,以秒为单位。 默认值:  | |
| 如果为  仅在个人控制的使用自签名证书的站点上配置  在集合版本  选择 
 | |
| 身份验证令牌。 如果未提供 x_auth_token,则使用环境变量  示例:export IDRAC_X_AUTH_TOKEN=x_auth_token | 
备注
注意
- 从可以直接访问 Dell iDRAC 的系统运行此模块。 
- 此模块仅支持 iDRAC9 及以上版本。 
- 此模块支持 IPv4 和 IPv6 地址。 
- 此模块不支持 - check_mode。
- 当 share_type 为 - local进行导入和导出操作时,不显示 job_details。
示例
---
- name: Export a license from iDRAC to local
  dellemc.openmanage.idrac_license:
    idrac_ip: "192.168.0.1"
    idrac_user: "username"
    idrac_password: "password"
    ca_path: "/path/to/ca_cert.pem"
    license_id: "LICENSE_123"
    export: true
    share_parameters:
      share_type: "local"
      share_name: "/path/to/share"
      file_name: "license_file"
- name: Export a license from iDRAC to NFS share
  dellemc.openmanage.idrac_license:
    idrac_ip: "192.168.0.1"
    idrac_user: "username"
    idrac_password: "password"
    ca_path: "/path/to/ca_cert.pem"
    license_id: "LICENSE_123"
    export: true
    share_parameters:
      share_type: "nfs"
      share_name: "/path/to/share"
      file_name: "license_file"
      ip_address: "192.168.0.1"
- name: Export a license from iDRAC to CIFS share
  dellemc.openmanage.idrac_license:
    idrac_ip: "192.168.0.1"
    idrac_user: "username"
    idrac_password: "password"
    ca_path: "/path/to/ca_cert.pem"
    license_id: "LICENSE_123"
    export: true
    share_parameters:
      share_type: "cifs"
      share_name: "/path/to/share"
      file_name: "license_file"
      ip_address: "192.168.0.1"
      username: "username"
      password: "password"
      workgroup: "workgroup"
- name: Export a license from iDRAC to HTTP share via proxy
  dellemc.openmanage.idrac_license:
    idrac_ip: "192.168.0.1"
    idrac_user: "username"
    idrac_password: "password"
    ca_path: "/path/to/ca_cert.pem"
    license_id: "LICENSE_123"
    export: true
    share_parameters:
      share_type: "http"
      share_name: "/path/to/share"
      file_name: "license_file"
      ip_address: "192.168.0.1"
      username: "username"
      password: "password"
      proxy_support: "parameters_proxy"
      proxy_type: socks
      proxy_server: "192.168.0.2"
      proxy_port: 1080
      proxy_username: "proxy_username"
      proxy_password: "proxy_password"
- name: Export a license from iDRAC to HTTPS share
  dellemc.openmanage.idrac_license:
    idrac_ip: "192.168.0.1"
    idrac_user: "username"
    idrac_password: "password"
    ca_path: "/path/to/ca_cert.pem"
    license_id: "LICENSE_123"
    export: true
    share_parameters:
      share_type: "https"
      share_name: "/path/to/share"
      file_name: "license_file"
      ip_address: "192.168.0.1"
      username: "username"
      password: "password"
      ignore_certificate_warning: "on"
- name: Import a license to iDRAC from local
  dellemc.openmanage.idrac_license:
    idrac_ip: 198.162.0.1
    idrac_user: "username"
    idrac_password: "password"
    ca_path: "/path/to/ca_cert.pem"
    import: true
    share_parameters:
      file_name: "license_file_name.xml"
      share_type: local
      share_name: "/path/to/share"
- name: Import a license to iDRAC from NFS share
  dellemc.openmanage.idrac_license:
    idrac_ip: 198.162.0.1
    idrac_user: "username"
    idrac_password: "password"
    ca_path: "/path/to/ca_cert.pem"
    import: true
    share_parameters:
      file_name: "license_file_name.xml"
      share_type: nfs
      ip_address: "192.168.0.1"
      share_name: "/path/to/share"
- name: Import a license to iDRAC from CIFS share
  dellemc.openmanage.idrac_license:
    idrac_ip: 198.162.0.1
    idrac_user: "username"
    idrac_password: "password"
    ca_path: "/path/to/ca_cert.pem"
    import: true
    share_parameters:
      file_name: "license_file_name.xml"
      share_type: cifs
      ip_address: "192.168.0.1"
      share_name: "/path/to/share"
      username: "username"
      password: "password"
- name: Import a license to iDRAC from HTTP share
  dellemc.openmanage.idrac_license:
    idrac_ip: 198.162.0.1
    idrac_user: "username"
    idrac_password: "password"
    ca_path: "/path/to/ca_cert.pem"
    import: true
    share_parameters:
      file_name: "license_file_name.xml"
      share_type: http
      ip_address: "192.168.0.1"
      share_name: "/path/to/share"
      username: "username"
      password: "password"
- name: Import a license to iDRAC from HTTPS share via proxy
  dellemc.openmanage.idrac_license:
    idrac_ip: 198.162.0.1
    idrac_user: "username"
    idrac_password: "password"
    ca_path: "/path/to/ca_cert.pem"
    import: true
    share_parameters:
      file_name: "license_file_name.xml"
      share_type: https
      ip_address: "192.168.0.1"
      share_name: "/path/to/share"
      username: "username"
      password: "password"
      proxy_support: "parameters_proxy"
      proxy_server: "192.168.0.2"
      proxy_port: 808
      proxy_username: "proxy_username"
      proxy_password: "proxy_password"
- name: Delete a License from iDRAC
  dellemc.openmanage.idrac_license:
    idrac_ip: 198.162.0.1
    idrac_user: "username"
    idrac_password: "password"
    ca_path: "/path/to/ca_cert.pem"
    license_id: "LICENCE_123"
    delete: true
返回值
通用返回值记录在此处,以下是此模块特有的字段
| 键 | 描述 | 
|---|---|
| HTTP 错误的详细信息。 返回:当发生 HTTP 错误时 示例:  | |
| 返回作业状态的输出。 返回:用于导入和导出操作 示例:  | |
| 许可证操作的状态。 返回:始终 示例:  | 
