netapp.storagegrid.na_sg_grid_account 模块 – NetApp StorageGRID 账户管理。

注意

此模块是 netapp.storagegrid 集合 (版本 21.13.0) 的一部分。

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

要安装它,请使用: ansible-galaxy collection install netapp.storagegrid

要在 playbook 中使用它,请指定: netapp.storagegrid.na_sg_grid_account

netapp.storagegrid 20.6.0 中的新增功能

概要

  • 在 NetApp StorageGRID 上创建、更新和删除租户帐户。

参数

参数

注释

account_id

字符串

租户的帐户 ID。

可用于修改或删除操作。

allow_platform_services

布尔值

允许租户使用平台服务功能,例如 CloudMirror。

选项

  • false

  • true

allow_select_object_content

布尔值

netapp.storagegrid 21.12.0 中新增

允许租户使用 S3 SelectObjectContent API 来过滤和检索对象数据。

选项

  • false

  • true

api_url

字符串 / 必需

StorageGRID 管理节点 REST API 的 URL。

auth_token

字符串 / 必需

API 请求的授权令牌

description

字符串

netapp.storagegrid 21.12.0 中新增

租户帐户的其他识别信息。

management

布尔值

租户是否可以登录 StorageGRID 租户门户。

选项

  • false

  • true ← (默认)

name

字符串

租户的名称。

创建或修改操作所需。

password

字符串

租户帐户的根密码。

需要 root 权限。

protocol

字符串

租户使用的对象存储协议。

创建操作所需。

选项

  • "s3"

  • "swift"

quota_size

整数

应用于以 *quota_size_unit* 指定的租户的配额。

如果您打算没有限制,请分配 0

默认值: 0

quota_size_unit

字符串

用于解释大小参数的单位。

选项

  • "bytes"

  • "b"

  • "kb"

  • "mb"

  • "gb" ← (默认)

  • "tb"

  • "pb"

  • "eb"

  • "zb"

  • "yb"

root_access_group

字符串

netapp.storagegrid 20.11.0 中新增

现有联合组,对租户具有初始根访问权限。

必须以 federated-group/ 开头

state

字符串

指定的帐户是否存在。

所有操作都需要。

选项

  • "present" ← (默认)

  • "absent"

update_password

字符串

选择何时更新密码。

设置为 always 时,密码将始终更新。

设置为 on_create 时,密码仅在新用户创建时设置。

选项

  • "on_create" ← (默认)

  • "always"

use_own_identity_source

布尔值

租户帐户是否应配置其自己的身份源。

选项

  • false

  • true

validate_certs

布尔值

是否应验证 https 证书?

选项

  • false

  • true ← (默认)

备注

注意

  • na_sg 为前缀的模块用于管理 NetApp StorageGRID。

示例

- name: create a tenant account
  netapp.storagegrid.na_sg_grid_account:
    api_url: "https://<storagegrid-endpoint-url>"
    auth_token: "storagegrid-auth-token"
    validate_certs: false
    state: present
    name: storagegrid-tenant-1
    protocol: s3
    management: true
    use_own_identity_source: false
    allow_platform_services: false
    password: "tenant-password"
    quota_size: 0

- name: update a tenant account
  netapp.storagegrid.na_sg_grid_account:
    api_url: "https://<storagegrid-endpoint-url>"
    auth_token: "storagegrid-auth-token"
    validate_certs: false
    state: present
    name: storagegrid-tenant-1
    protocol: s3
    management: true
    use_own_identity_source: false
    allow_platform_services: true
    password: "tenant-password"
    quota_size: 10240

- name: delete a tenant account
  netapp.storagegrid.na_sg_grid_account:
    api_url: "https://<storagegrid-endpoint-url>"
    auth_token: "storagegrid-auth-token"
    validate_certs: false
    state: absent
    name: storagegrid-tenant-1
    protocol: s3

返回值

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

描述

resp

字典

返回有关 StorageGRID 租户帐户的信息。

返回: 成功

示例: {"capabilities": ["management", "s3"], "id": "12345678901234567890", "name": "Example Account", "policy": {"allowPlatformServices": false, "quotaObjectBytes": 100000000000, "useAccountIdentitySource": true}}

作者

  • NetApp Ansible 团队 (@joshedmonds)