# Need a parser that will help me compare free space of member switches

**URL:** <https://forum.ansible.com/t/need-a-parser-that-will-help-me-compare-free-space-of-member-switches/35006>\
**Category:** Ansible Project\
**Created:** [April 18, 2021, 4:46pm UTC](https://forum.ansible.com/t/need-a-parser-that-will-help-me-compare-free-space-of-member-switches/35006 "2021-04-18T16:46:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vikram\_S](https://avatars.discourse-cdn.com/v4/letter/v/90db22/32.png) [@Vikram\_S](https://forum.ansible.com/u/Vikram_S)\
**Post date:** [April 18, 2021, 4:46pm UTC](https://forum.ansible.com/t/need-a-parser-that-will-help-me-compare-free-space-of-member-switches/35006/1 "2021-04-18T16:46:16Z")

</div>

In a stacked switch, ‘ansible\_net\_filesystems\_info’ of ios\_facts module only shows free space of master switch. It doesn’t show space of member switches. But I need to write a script that will check for certain amt of free space in EVERY member switch before copying ios image.

I thought of making ansible store free space of every member switch in a custom variable and then use parsing to compare free space. But the problem is that Pyats/Genie parser (the only parser i finally managed to understand) doesn’t support below command (it only supports ‘sh bootflash:’ which doesn’t work with my switch model). Is there any other parser that can help me achieve my objective?

sh flash2: | i bytes free

122185728 bytes total (9308672 bytes free)

On a separate note, i have gone thorugh ansible documentation and several sites to understand parsing but i still can’t make sense of it. Is there any tutorial that heps me understand parsing easily? I have never struggled to understand any other ansible concept like the way i struggled for parsing?

Thanks in advance.
