Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm new to the NetApp Ansible Modules. Working on few reports and planning to use ansible module "na_ontap_info" to collect some data. Module is working fine as long as i specifically mention one item in "gather_subset: " arugument, example "gather_subset: aggregate_info". Module is failing if i mention "all" for the same argument like "gather_subset: all". I want to collect all the info in one task and then later parse it to get the required info. Is there anything that i'm doing wrong here?. augument "all" is no longer supported for "gather_subset" ?
Error: An exception occurred during task execution. To see the full traceback, use -vvv. The error was: KeyError: 'tree'
- name: Gathering NetApp Information
na_ontap_info:
hostname: "{{ netapp_hostname }}"
username: "{{ username }}"
password: "{{ password }}"
https: true
validate_certs: false
gather_subset: all
register: ontap_facts
Solved! See The Solution
1 ACCEPTED SOLUTION
Shift407 has accepted the solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
excluding couple of entities from subset resolved the issue. May be due to the version inconsistencies. Thanks.
gather_subset: all
- "!qtree_info"
- "!quota_report"
4 REPLIES 4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Try this, worked for me...
---
- hosts: localhost
name: Get ONTAP Info
gather_facts: false
collections:
- netapp.ontap
vars_prompt:
- name: "cluster"
prompt: "Please enter the cluster name or IP Address"
private: no
- name: "username"
prompt: "Please enter the username"
private: no
- name: "password"
prompt: "Please enter password"
private: yes
vars:
login: &login
hostname: "{{ cluster }}"
username: "{{ username }}"
password: "{{ password }}"
https: true
validate_certs: false
tasks:
- name: Get ONTAP info
na_ontap_info:
gather_subset: all
<<: *login
register: ontap_info
- debug:
msg: "{{ ontap_info.ontap_info }}"
You might also consider asking questions regarding ansible on slack
/Matt
If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Matt for the response. Still running into the same issue after using the syntax you provided. Everything is working fine if i don't use "all" option. May be some issue with the collection version I'm using. Thanks for the slack channel link. Will Join.
Shift407 has accepted the solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
excluding couple of entities from subset resolved the issue. May be due to the version inconsistencies. Thanks.
gather_subset: all
- "!qtree_info"
- "!quota_report"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Just remove the entire "gather_subnet" line - you'll get all the info.
