Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions ansible/cluster_info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
connection: local

tasks:
# -- Step 1: Get cluster version ------------------------------------
- name: Get cluster info
# -- Step 1: Get cluster identity ------------------------------------
- name: Get cluster identity
netapp.ontap.na_ontap_rest_info:
hostname: "{{ ontap_hostname }}"
username: "{{ ontap_username }}"
Expand All @@ -24,17 +24,17 @@
validate_certs: "{{ ontap_validate_certs }}"
use_rest: always
gather_subset:
- cluster/nodes
- cluster
fields:
- "name"
- "version"
register: cluster_result
no_log: false

- name: Display cluster version
ansible.builtin.debug:
msg: >-
Cluster node: {{ cluster_result.ontap_info['cluster/nodes']['records'][0].name | default('unknown') }}
— ONTAP {{ cluster_result.ontap_info['cluster/nodes']['records'][0].version.full | default('unknown') }}
Cluster: {{ cluster_result.ontap_info.cluster.name | default('unknown') }}
— ONTAP {{ cluster_result.ontap_info.cluster.version.full | default('unknown') }}

# -- Step 2: List nodes with serial numbers -------------------------
- name: Get node details
Expand Down
Loading