netapp_eseries.santricity.netapp_e_ldap 模块 – NetApp E 系列管理 LDAP 集成用于身份验证

注意

此模块是 netapp_eseries.santricity 集合 (版本 1.4.1) 的一部分。

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

要安装它,请使用: ansible-galaxy collection install netapp_eseries.santricity

要在 playbook 中使用它,请指定: netapp_eseries.santricity.netapp_e_ldap

netapp_eseries.santricity 2.7.0 中的新增功能

摘要

  • 配置 E 系列系统以允许通过 LDAP 服务器进行身份验证

参数

参数

注释

api_password

字符串 / 必需

用于向 SANtricity Web Services 代理或嵌入式 Web Services API 进行身份验证的密码。

api_url

字符串 / 必需

SANtricity Web Services 代理或嵌入式 Web Services API 的 URL。示例 https://prod-1.wahoo.acme.com/devmgr/v2

api_username

字符串 / 必需

用于向 SANtricity Web Services 代理或嵌入式 Web Services API 进行身份验证的用户名。

attributes

列表 / 元素=字符串

应考虑用于组到角色映射的用户属性。

通常,这与诸如“memberOf”之类的内容一起使用,并且会根据组成员资格或缺乏组成员资格来测试用户的访问权限。

默认值: ["memberOf"]

identifier

字符串

这是配置的唯一标识符(对于配置了多个域的情况)。

如果未指定此项,但 *state=present*,我们将使用默认值“default”。

log_path

字符串

用于调试日志记录的本地文件路径

name

列表 / 元素=字符串

身份验证时将使用的域名称,用于确定要使用的域。

默认为使用 *服务器* 的 DNS 名称。

唯一的要求是名称必须可解析。

示例:user@example.com

password

别名:bind_password

字符串 / 必需

这是绑定用户帐户的密码。

role_mappings

字典 / 必需

在这里,您可以指定哪些组应该对存储系统具有哪些权限。

例如,组 A 中的所有用户将被分配所有 4 个可用角色,这将允许访问系统的全部管理功能(超级用户)。组 B 中的用户只有 storage.monitor 角色,这将只允许只读访问。

这指定为正则表达式到角色列表的映射。请参阅示例。

将分配给与提供的正则表达式匹配的组/组的角色。

storage.admin 允许用户完全读写访问存储对象和操作。

storage.monitor 允许用户只读访问存储对象和操作。

support.admin 允许用户访问硬件、诊断信息、主要事件日志和其他关键支持相关功能,但不包括存储配置。

security.admin 允许用户访问身份验证/授权配置,以及审计日志配置和证书管理。

search_base

字符串 / 必需

搜索基准用于查找用户的组成员资格。

示例:ou=users,dc=example,dc=com

server

别名:server_url

字符串 / 必需

这是 LDAP 服务器 URL。

连接字符串应指定为使用 ldap 或 ldaps 协议以及端口信息。

ssid

字符串

要管理的阵列的 ID。此值对于每个阵列必须唯一。

默认值: "1"

state

字符串

启用/禁用系统上的 LDAP 支持。禁用将清除任何现有已定义的域。

选项

  • "present" ← (默认)

  • "absent"

user_attribute

字符串

这是我们将用于在用户尝试进行身份验证时匹配提供的用户名的属性。

默认值: "sAMAccountName"

username

别名:bind_username

字符串 / 必需

这是将用于查询 LDAP 服务器的用户帐户。

示例:CN=MyBindAcct,OU=ServiceAccounts,DC=example,DC=com

validate_certs

布尔值

是否应验证 https 证书?

选项

  • false

  • true ← (默认)

备注

注意

  • 支持检查模式。

  • 此模块允许您定义一个或多个由 *identifier* 唯一标识的 LDAP 域,用于身份验证。授权由 *role_mappings* 确定,因为不同的用户组可能会被赋予对系统和 API 的某些方面的不同(或无)访问权限。

  • 如果 LDAP 服务器不可用/无法访问,本地用户帐户仍然可用。

  • 通常,您需要在能够配置系统以使用 LDAP 身份验证之前获取组织的 LDAP 服务器的详细信息;每个实现都可能大相径庭。

  • 此 API 当前仅支持嵌入式 Web Services API v2.0 及更高版本或 Web Services 代理 v3.0 及更高版本。

  • E 系列 Ansible 模块需要 Web Services 代理 (WSP) 实例才能管理存储系统,或者支持嵌入式 Web Services API 的 E 系列存储系统。

  • 嵌入式 Web Services 目前适用于 E2800、E5700、EF570 和更新的硬件型号。

  • netapp_eseries.santricity.netapp_e_storage_system 可用于配置由 WSP 实例管理的系统。

示例

- name: Disable LDAP authentication
  netapp_e_ldap:
    api_url: "10.1.1.1:8443"
    api_username: "admin"
    api_password: "myPass"
    ssid: "1"
    state: absent

- name: Remove the 'default' LDAP domain configuration
  netapp_e_ldap:
    state: absent
    identifier: default

- name: Define a new LDAP domain, utilizing defaults where possible
  netapp_e_ldap:
    state: present
    bind_username: "CN=MyBindAccount,OU=ServiceAccounts,DC=example,DC=com"
    bind_password: "mySecretPass"
    server: "ldap://example.com:389"
    search_base: 'OU=Users,DC=example,DC=com'
    role_mappings:
      ".*dist-dev-storage.*":
        - storage.admin
        - security.admin
        - support.admin
        - storage.monitor

返回值

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

描述

msg

字符串

成功消息

返回:成功时

示例: "LDAP 设置 更新。"

作者

  • Michael Price (@lmprice)