# How to set or declare a volume group as fact

**URL:** <https://forum.ansible.com/t/how-to-set-or-declare-a-volume-group-as-fact/34559>\
**Category:** Ansible Project\
**Created:** [February 3, 2021, 2:54am UTC](https://forum.ansible.com/t/how-to-set-or-declare-a-volume-group-as-fact/34559 "2021-02-03T02:54:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aris\_Aguirre](https://avatars.discourse-cdn.com/v4/letter/a/d6d6ee/32.png) [@Aris\_Aguirre](https://forum.ansible.com/u/Aris_Aguirre)\
**Post date:** [February 3, 2021, 2:54am UTC](https://forum.ansible.com/t/how-to-set-or-declare-a-volume-group-as-fact/34559/1 "2021-02-03T02:54:15Z")

</div>

I cant see my volume group vgtemp if I will run a ansible -m setup.  
How to declare or how to make it available/define if i will run ansible -m setup?  
Thanks

---

<div class="post-metadata">

**Author:** ![Dick\_Visser](https://avatars.discourse-cdn.com/v4/letter/d/d9b06d/32.png) [@Dick\_Visser](https://forum.ansible.com/u/Dick_Visser)\
**Post date:** [February 3, 2021, 6:47am UTC](https://forum.ansible.com/t/how-to-set-or-declare-a-volume-group-as-fact/34559/2 "2021-02-03T06:47:56Z")

</div>

I don’t think you can, you’d have to add an explicit task to fetch that information somehow.  
For example by running vgdisplay and registering the results.  
If your have a recent enough OS then the lvm utilities have a json output option which will make this a lot easier.
