purestorage.flashblade.purefb_apiclient (1.17.0) — module

Manage FlashBlade API Clients

| "added in version" 1.6.0 of purestorage.flashblade"

Authors: Pure Storage Ansible Team (@sdodsley) <pure-ansible-team@purestorage.com>

preview | supported by community

Install collection

Install with ansible-galaxy collection install purestorage.flashblade:==1.17.0


Add to requirements.yml

  collections:
    - name: purestorage.flashblade
      version: 1.17.0

Description

Enable or disable FlashBlade API Clients


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create API token ansible-token
  purestorage.flashblade.purefb_apiclient:
    name: ansible_token
    issuer: "Pure_Storage"
    token_ttl: 3000
    role: array_admin
    public_key: "{{lookup('file', 'public_pem_file') }}"
    fb_url: 10.10.10.2
    api_token: T-68618f31-0c9e-4e57-aa44-5306a2cf10e3
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Disable API CLient
  purestorage.flashblade.purefb_apiclient:
    name: ansible_token
    enabled: false
    fb_url: 10.10.10.2
    api_token: T-68618f31-0c9e-4e57-aa44-5306a2cf10e3
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Enable API CLient
  purestorage.flashblade.purefb_apiclient:
    name: ansible_token
    enabled: true
    fb_url: 10.10.10.2
    api_token: T-68618f31-0c9e-4e57-aa44-5306a2cf10e3
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Delete API Client
  purestorage.flashblade.purefb_apiclient:
    state: absent
    name: ansible_token
    fb_url: 10.10.10.2
    api_token: T-68618f31-0c9e-4e57-aa44-5306a2cf10e3

Inputs

    
name:
    description:
    - Name of the API Client
    required: true
    type: str

role:
    choices:
    - readonly
    - ops_admin
    - storage_admin
    - array_admin
    description:
    - The maximum role allowed for ID Tokens issued by this API client
    type: str

state:
    choices:
    - absent
    - present
    default: present
    description:
    - Define whether the API client should exist or not.
    type: str

fb_url:
    description:
    - FlashBlade management IP address or Hostname.
    type: str

issuer:
    description:
    - The name of the identity provider that will be issuing ID Tokens for this API client
    - If not specified, defaults to the API client name, I(name).
    type: str

enabled:
    default: true
    description:
    - State of the API Client Key
    type: bool

api_token:
    description:
    - FlashBlade API token for admin privileged user.
    type: str

token_ttl:
    default: 86400
    description:
    - Time To Live length in seconds for the exchanged access token
    - Range is 1 second to 1 day (86400 seconds)
    type: int

public_key:
    description:
    - The API clients PEM formatted (Base64 encoded) RSA public key.
    - "Include the I(\u2014\u2013BEGIN PUBLIC KEY\u2014\u2013) and I(\u2014\u2013END PUBLIC\
      \ KEY\u2014\u2013) lines"
    type: str