dellemc.openmanage.idrac_user_info 模块 – 获取 iDRAC 上所有用户或特定用户的详细信息。

注意

此模块是 dellemc.openmanage 集合(版本 9.9.0)的一部分。

如果您正在使用 ansible 包,您可能已经安装了这个集合。它不包含在 ansible-core 中。要检查是否已安装,请运行 ansible-galaxy collection list

要安装它,请使用:ansible-galaxy collection install dellemc.openmanage。您需要进一步的要求才能使用此模块,请参阅 要求 了解详细信息。

要在 playbook 中使用它,请指定:dellemc.openmanage.idrac_user_info

dellemc.openmanage 7.0.0 中的新功能

概要

  • 此模块检索 iDRAC 上所有用户的列表和基本详细信息,或特定用户的详细信息

要求

执行此模块的主机需要满足以下要求。

  • python >= 3.9.6

参数

参数

注释

ca_path

路径

在 dellemc.openmanage 5.0.0 中添加

包含用于验证的 CA 证书的隐私增强邮件 (PEM) 文件。

idrac_ip

字符串 / 必需

iDRAC IP 地址。

idrac_password

别名:idrac_pwd

字符串

iDRAC 用户密码。

如果未提供密码,则使用环境变量 IDRAC_PASSWORD

示例:export IDRAC_PASSWORD=password

idrac_port

整数

iDRAC 端口。

默认值: 443

idrac_user

字符串

iDRAC 用户名。

如果未提供用户名,则使用环境变量 IDRAC_USERNAME

示例:export IDRAC_USERNAME=username

timeout

整数

在 dellemc.openmanage 5.0.0 中添加

套接字级别的超时时间(以秒为单位)。

默认值: 30

user_id

整数

支持 1 到 16 的顺序用户 ID 号。

user_idusername 互斥

username

字符串

在 iDRAC 本地用户中创建的帐户的用户名。

usernameuser_id 互斥

validate_certs

布尔值

在 dellemc.openmanage 5.0.0 中添加

如果为 false,则不会验证 SSL 证书。

仅在个人控制的使用自签名证书的站点上配置 false

在集合版本 5.0.0 之前,validate_certs 默认为 false

选择

  • false

  • true ←(默认)

x_auth_token

字符串

在 dellemc.openmanage 9.3.0 中添加

身份验证令牌。

如果未提供 x_auth_token,则使用环境变量 IDRAC_X_AUTH_TOKEN

示例:export IDRAC_X_AUTH_TOKEN=x_auth_token

说明

注意

  • 在可以直接访问 Dell iDRAC 的系统上运行此模块。

  • 此模块支持 check_mode

示例

---
- name: Retrieve basic details of all user accounts.
  dellemc.openmanage.idrac_user_info:
    idrac_ip: 198.162.0.1
    idrac_user: idrac_user
    idrac_password: idrac_password
    ca_path: "/path/to/ca_cert.pem"

- name: Retrieve user details using user_id
  dellemc.openmanage.idrac_user_info:
    idrac_ip: 198.162.0.1
    idrac_user: idrac_user
    idrac_password: idrac_password
    ca_path: "/path/to/ca_cert.pem"
    user_id: 1

- name: Retrieve user details using username
  dellemc.openmanage.idrac_user_info:
    idrac_ip: 198.162.0.1
    idrac_user: idrac_user
    idrac_password: idrac_password
    ca_path: "/path/to/ca_cert.pem"
    username: user_name

返回值

常见返回值记录在此处,以下是此模块特有的字段

描述

error_info

字典

HTTP 错误的详细信息。

返回:在 HTTP 错误时

示例: {"error": {"@Message.ExtendedInfo": [{"Message": "无法处理请求,因为发生错误。", "MessageArgs": [], "MessageId": "GEN1234", "RelatedProperties": [], "Resolution": "重试操作。如果问题仍然存在,请联系您的系统管理员。", "Severity": "Critical"}], "code": "Base.1.0.GeneralError", "message": "发生了一般错误。请参阅 ExtendedInfo 了解更多信息。"}}

msg

字符串

用户信息检索的状态。

返回:始终

示例: "成功检索用户信息。"

user_info

列表 / 元素=字符串

有关用户的信息。

返回:成功

示例: [{"Description": "用户帐户", "Enabled": false, "Id": "1", "Locked": false, "Name": "用户帐户", "Password": null, "RoleId": "None", "UserName": ""}]

作者

  • Husniya Hameed(@husniya_hameed)