purestorage.flasharray.purefa_token 模块 – 为现有管理员用户创建或删除 API 令牌
注意
此模块是 purestorage.flasharray 集合 (版本 1.32.0) 的一部分。
如果您使用的是 ansible
软件包,则可能已安装此集合。它不包含在 ansible-core
中。要检查它是否已安装,请运行 ansible-galaxy collection list
。
要安装它,请使用:ansible-galaxy collection install purestorage.flasharray
。
要在 playbook 中使用它,请指定:purestorage.flasharray.purefa_token
。
purestorage.flasharray 1.0.0 中的新增功能
概要
为现有管理员用户创建或删除 API 令牌。
使用用户名/密码创建/删除 API 令牌。
参数
参数 |
注释 |
---|---|
禁用调试日志中的不安全证书警告 选项
|
|
FlashArray 管理 IPv4 地址或主机名。 |
|
要为其创建 API 令牌的管理员用户的密码。 |
|
重新创建 API 令牌,如果存在则覆盖现有 API 令牌 选项
|
|
创建或删除 API 令牌 选项
|
|
API 令牌有效期。 有效值为周 (w)、天 (d)、小时 (h)、分钟 (m) 和秒 (s)。 |
|
要为其创建 API 令牌的管理员用户名 |
示例
- name: Create API token with no expiration
purefa_token:
username: pureuser
password: secret
state: present
fa_url: 10.10.10.2
- name: Create API token with 23 days expiration
purefa_token:
username: pureuser
password: secret
state: present
timeout: 23d
fa_url: 10.10.10.2
- name: Delete API token
purefa_token:
username: pureuser
password: secret
state: absent
fa_url: 10.10.10.2
返回值
常见的返回值已在 此处 记录,以下是此模块特有的字段
键 |
描述 |
---|---|
用户的 API 令牌 返回:changed 示例: |