infinidat.infinibox.infini_users_repository 模块 – 创建、删除或修改可登录 Infinibox 的用户资源库

注意

此模块是 infinidat.infinibox 集合 (版本 1.4.5) 的一部分。

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

要安装它,请使用: ansible-galaxy collection install infinidat.infinibox。您需要其他要求才能使用此模块,有关详细信息,请参阅 要求

要在剧本中使用它,请指定: infinidat.infinibox.infini_users_repository

infinidat.infinibox 2.13.0 中的新增功能

概要

  • 此模块创建、删除或修改可登录 Infinibox 的用户资源库。

要求

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

参数

参数

注释

ad_auto_discover_servers

布尔值

AD 自动发现服务器

选项

  • false

  • true ← (默认)

ad_domain_name

字符串

AD 域名

bind_password

字符串

绑定用户的密码

bind_username

字符串

绑定用户名

ldap_port

整数

要使用的 LDAP 或 AD 端口

默认值: 636

ldap_servers

列表 / 元素=字符串

LDAP 或 AD 服务器列表

默认值: []

name

字符串 / 必需

资源库名称

password

字符串 / 必需

Infinibox 用户密码。

repository_type

字符串

资源库类型

选项

  • "ActiveDirectory"

  • "LDAP"

schema_group_class

字符串

模式组类

schema_group_memberof_attribute

字符串

模式组成员属性

schema_group_name_attribute

字符串

模式组名称属性

schema_groups_basedn

字符串

模式组基础 DN

schema_user_class

字符串

模式用户类

schema_username_attribute

字符串

模式用户名属性

schema_users_basedn

字符串

模式用户基础 DN

servers

列表 / 元素=字符串

LDAP 服务器列表。对于空列表,请使用 []。

默认值: []

state

字符串

存在时创建/修改用户资源库,不存在时删除。

获取用户资源库的统计信息时,模块将测试与资源库的连接,并在“test_ok”中报告结果为 true 或 false。

选项

  • "stat"

  • "present" ← (默认)

  • "absent"

system

字符串 / 必需

Infinibox 主机名或 IPv4 地址。

use_ldaps

布尔值

使用 SSL (LDAPS)

选项

  • false

  • true ← (默认)

user

字符串 / 必需

具有足够权限的 Infinibox 用户用户名(参见注释)。

注释

注意

  • 此模块需要 infinisdk python 库

  • 如果未将 user 和 password 参数直接传递给模块,则必须设置 INFINIBOX_USER 和 INFINIBOX_PASSWORD 环境变量

  • 如果未提供凭据,Ansible 将使用 infinisdk 配置文件 ~/.infinidat/infinisdk.ini。请参见 http://infinisdk.readthedocs.io/en/latest/getting_started.html

  • 所有 Infinidat 模块都支持检查模式(--check)。但是,如果资源依赖项不满足任务的要求,则创建资源的预运行可能会失败。例如,考虑一个在池中创建卷的任务。如果池不存在,则卷创建任务将失败。即使剧本中有一个之前的任务本来会创建该池,但由于池创建也是预运行的一部分,所以它也会失败。

示例

- name: Create AD
  infini_users_repository:
    name: PSUS_ANSIBLE_ad
    bind_password: tuFrAxahuYe4
    bind_username: conldap
    ad_domain_name: infinidat.com
    repository_type: ActiveDirectory
    schema_group_class: group
    schema_group_memberof_attribute: memberof
    schema_group_name_attribute: cn
    schema_groups_basedn:
    schema_user_class: user
    schema_username_attribute: sAMAccountName
    state: present
    system: 172.20.67.167
    user: dohlemacher
    password: 123456

- name: Stat AD
  infini_users_repository:
    name: PSUS_ANSIBLE_ad
    state: stat
    user: admin
    password: secret
    system: ibox001

- name: Remove AD
  infini_users_repository:
    name: PSUS_ANSIBLE_ad
    state: absent
    user: admin
    password: secret
    system: ibox001

作者

  • David Ohlemacher (@ohlemacher)