purestorage.flasharray.purefa_vg 模块 – 管理 Pure Storage FlashArray 上的卷组

注意

此模块是 purestorage.flasharray 集合 (版本 1.32.0) 的一部分。

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

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

要在 playbook 中使用它,请指定: purestorage.flasharray.purefa_vg

purestorage.flasharray 1.0.0 中的新增功能

概要

  • 在 Pure Storage FlashArray 上创建、删除或修改卷组。

要求

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

  • python >= 3.3

  • purestorage >= 1.19

  • py-pure-client >= 1.26.0

  • netaddr

  • requests

  • pycountry

  • urllib3

参数

参数

注释

api_token

字符串

具有管理员权限用户的 FlashArray API 令牌。

bw_qos

字符串

卷组的带宽限制,单位为 M 或 G。M 表示 MB/s,G 表示 GB/s。要清除现有的 QoS 设置,请使用 0(零)。

count

整数

在创建多个卷组时要创建的卷组数量。

仅在 Purity//FA v6.0.0 及更高版本中支持。

digits

整数

用于多个卷组计数的数字位数。这将在必要时用零填充索引号。

仅在 Purity//FA v6.0.0 及更高版本中支持。

范围在 1 到 10 之间。

默认值: 1

disable_warnings

布尔值

在 purestorage.flasharray 1.29.0 中添加。

禁用调试日志中的不安全证书警告。

选项

  • false ← (默认)

  • true

eradicate

布尔值

定义在删除时是否根除卷组并将其留在回收站中。

选项

  • false ← (默认)

  • true

fa_url

字符串

FlashArray 管理 IPv4 地址或主机名。

iops_qos

字符串

卷组的 IOPs 限制 - 使用值或 K 或 M,K 表示 1000,M 表示 1000000。要清除现有的 IOPs 设置,请使用 0(零)。

name

字符串 / 必需

卷组的名称。

Purity//FA 6.0.0 版起支持多卷组;**注意** 使用多卷组创建的单个卷组的手动删除或根除将导致幂等性失败。

多卷组支持仅存在于卷组创建中。

priority_operator

字符串

在 purestorage.flasharray 1.13.0 中添加。

DMM 优先级调整运算符。

选项

  • "+" ← (默认)

  • "-"

priority_value

整数

在 purestorage.flasharray 1.13.0 中添加。

DMM 优先级调整值。

选项

  • 0 ← (默认)

  • 10

rename

字符串

在 purestorage.flasharray 1.22.0 中添加。

将指定卷组重命名为的值。

start

整数

多个卷组创建索引的起始编号。

仅在 Purity//FA v6.0.0 及更高版本中支持。

默认值: 0

state

字符串

定义卷组是否存在。

选项

  • "absent"

  • "present" ← (默认)

suffix

字符串

如果需要,用于创建多个卷组的后缀字符串。

卷组名称将形成如下:<name>#I<suffix>,其中 # 是卷索引的占位符,请参见相关说明。

仅在 Purity//FA v6.0.0 及更高版本中支持。

备注

注意

  • 此模块需要 purestoragepy-pure-client Python 库。

  • 特定模块可能需要其他 Python 库。

  • 如果未直接将 fa_urlapi_token 参数传递给模块,则必须设置 PUREFA_URLPUREFA_API 环境变量。

示例

- name: Create new volune group
  purestorage.flasharray.purefa_vg:
    name: foo
    bw_qos: 50M
    iops_qos: 100
    fa_url: 10.10.10.2
    api_token: e31060a7-21fc-e277-6240-25983c6c4592

- name: Create 10 volune groups of pattern foo#bar with QoS
  purestorage.flasharray.purefa_vg:
    name: foo
    suffix: bar
    count: 10
    start: 10
    digits: 3
    bw_qos: 50M
    iops_qos: 100
    fa_url: 10.10.10.2
    api_token: e31060a7-21fc-e277-6240-25983c6c4592

- name: Update volune group QoS limits
  purestorage.flasharray.purefa_vg:
    name: foo
    bw_qos: 0
    iops_qos: 5555
    fa_url: 10.10.10.2
    api_token: e31060a7-21fc-e277-6240-25983c6c4592

- name: Update volune group DMM Priority Adjustment (Purity//FA 6.1.2+)
  purestorage.flasharray.purefa_vg:
    name: foo
    priority_operator: '-'
    priority_value: 10
    fa_url: 10.10.10.2
    api_token: e31060a7-21fc-e277-6240-25983c6c4592

- name: Destroy volume group
  purestorage.flasharray.purefa_vg:
    name: foo
    fa_url: 10.10.10.2
    api_token: e31060a7-21fc-e277-6240-25983c6c4592
    state: absent

- name: Recover deleted volune group - no changes are made to the volume group on recovery
  purestorage.flasharray.purefa_vg:
    name: foo
    fa_url: 10.10.10.2
    api_token: e31060a7-21fc-e277-6240-25983c6c4592

- name: Destroy and Eradicate volume group
  purestorage.flasharray.purefa_vg:
    name: foo
    eradicate: true
    fa_url: 10.10.10.2
    api_token: e31060a7-21fc-e277-6240-25983c6c4592
    state: absent

- name: Rename volume group foo to bar
  purestorage.flasharray.purefa_vg:
    name: foo
    rename: bar
    fa_url: 10.10.10.2
    api_token: e31060a7-21fc-e277-6240-25983c6c4592

作者

  • Pure Storage Ansible 团队 (@sdodsley)