# How to re-enable gather\_facts later in a playbook

**URL:** <https://forum.ansible.com/t/how-to-re-enable-gather-facts-later-in-a-playbook/19285>\
**Category:** Ansible Project\
**Created:** [September 17, 2015, 8:32am UTC](https://forum.ansible.com/t/how-to-re-enable-gather-facts-later-in-a-playbook/19285 "2015-09-17T08:32:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Emmanuel\_Lacour1](https://avatars.discourse-cdn.com/v4/letter/e/77aa72/32.png) [@Emmanuel\_Lacour1](https://forum.ansible.com/u/Emmanuel_Lacour1)\
**Post date:** [September 17, 2015, 8:32am UTC](https://forum.ansible.com/t/how-to-re-enable-gather-facts-later-in-a-playbook/19285/1 "2015-09-17T08:32:54Z")

</div>

Dear ansible users,

I have a playbook that install a VM, so at the beginning og the playbook I use “gather\_facts: no” because the VM is not yet ready, then I install the vm on the cluster using delegate\_to, then once the vm is up I would like to continue some tasks on the vm but I need facts now.

Is this possible?

---

<div class="post-metadata">

**Author:** ![David\_Karban](https://avatars.discourse-cdn.com/v4/letter/d/90db22/32.png) [@David\_Karban](https://forum.ansible.com/u/David_Karban)\
**Post date:** [September 17, 2015, 8:54am UTC](https://forum.ansible.com/t/how-to-re-enable-gather-facts-later-in-a-playbook/19285/2 "2015-09-17T08:54:01Z")

</div>

Hi,

you can either use gather\_facts: yes if you provision VM in another play, or just call an setup module like:

- name: Get VM facts  
setup:

---

<div class="post-metadata">

**Author:** ![Emmanuel\_Lacour1](https://avatars.discourse-cdn.com/v4/letter/e/77aa72/32.png) [@Emmanuel\_Lacour1](https://forum.ansible.com/u/Emmanuel_Lacour1)\
**Post date:** [September 17, 2015, 4:09pm UTC](https://forum.ansible.com/t/how-to-re-enable-gather-facts-later-in-a-playbook/19285/3 "2015-09-17T16:09:12Z")

</div>

I just tried, but it doesn’t works:

error while evaluating conditional: ansible\_os\_family == “Debian”

If I split the playbook and put tasks that needs fact in the second one with gather\_facts yes, it works. I’ll go this way. Thanks for your help!
