# How to get a list of mount points from facts gathered by ansible on Linux host?

**URL:** <https://forum.ansible.com/t/how-to-get-a-list-of-mount-points-from-facts-gathered-by-ansible-on-linux-host/28837>\
**Category:** Ansible Project\
**Created:** [October 21, 2018, 8:50am UTC](https://forum.ansible.com/t/how-to-get-a-list-of-mount-points-from-facts-gathered-by-ansible-on-linux-host/28837 "2018-10-21T08:50:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![shibhi](https://avatars.discourse-cdn.com/v4/letter/s/f475e1/32.png) [@shibhi](https://forum.ansible.com/u/shibhi)\
**Post date:** [October 21, 2018, 8:50am UTC](https://forum.ansible.com/t/how-to-get-a-list-of-mount-points-from-facts-gathered-by-ansible-on-linux-host/28837/1 "2018-10-21T08:50:17Z")

</div>

Hi Team:

I’m trying to get a list variable with mount points from Ansible facts. But, I’m getting the whole “ansible\_mounts” facts in JSON format. I have difficult time to retrieve only mount points in list format.

Like below.

mount\_points = [‘/’, ‘/boot’, ‘home’, ‘/usr’, ‘/var’, ‘/tmp’]

Please help.

Thanks,  
Shibhi

---

<div class="post-metadata">

**Author:** ![Kai\_Stian\_Olstad](https://avatars.discourse-cdn.com/v4/letter/k/e19adc/32.png) [@Kai\_Stian\_Olstad](https://forum.ansible.com/u/Kai_Stian_Olstad)\
**Post date:** [October 21, 2018, 9:00am UTC](https://forum.ansible.com/t/how-to-get-a-list-of-mount-points-from-facts-gathered-by-ansible-on-linux-host/28837/2 "2018-10-21T09:00:53Z")

</div>

{{ ansible\_mounts | map(attribute='mount') | list }}
