---
- name: Get FlashArray summary info
hosts: localhost
gather_facts: false
tasks:
- name: Get FlashArray system info
purestorage.flasharray.purefa_info:
gather_subset:
- hardware
- space
- arrays
fa_url: "{{ fa_url }}"
api_token: "{{ api_token }}"
register: fa_info
- name: Show FlashArray summary
debug:
msg:
- "Model: {{ fa_info.purefa_info.hardware[0].model }}"
- "Chassis Serial: {{ fa_info.purefa_info.hardware[0].serial }}"
- "Total Capacity: {{ fa_info.purefa_info.space.capacity | int // 1024 // 1024 // 1024 }} GB"
- "Used Capacity: {{ fa_info.purefa_info.space.total | int // 1024 // 1024 // 1024 }} GB"
- name: Gather all FlashArray volumes
purestorage.flasharray.purefa_volume:
state: list
fa_url: "{{ fa_url }}"
api_token: "{{ api_token }}"
register: volume_info
- name: Display basic info for each volume
debug:
msg: >-
{% for vol in volume_info.purefa_volumes %}
Volume: {{ vol.name }}
Size : {{ vol.size | int // 1024 // 1024 // 1024 }} GB
Created: {{ vol.created }}
Hosts : {{ vol.hosts | default([]) | join(', ') }}
-----
{% endfor %}