# Gather facts with check mode

**URL:** <https://forum.ansible.com/t/gather-facts-with-check-mode/13106>\
**Category:** Ansible Project\
**Created:** [July 11, 2013, 11:19pm UTC](https://forum.ansible.com/t/gather-facts-with-check-mode/13106 "2013-07-11T23:19:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Paul\_Hassinger](https://avatars.discourse-cdn.com/v4/letter/p/97f17d/32.png) [@Paul\_Hassinger](https://forum.ansible.com/u/Paul_Hassinger)\
**Post date:** [July 11, 2013, 11:19pm UTC](https://forum.ansible.com/t/gather-facts-with-check-mode/13106/1 "2013-07-11T23:19:31Z")

</div>

How can I get external gather facts to work with check mode?

For example, I’m using an action of ec2\_facts, however, this does not function with --check mode enabled, and my “ansible\_ec2\_\*” variables are not defined.

I need those variables defined to run my check of the results of what would happen.

Is there something I can do to make ec2\_facts (or any other gathering, I’d assume) runnable with check mode enabled?

Thank you very much.

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan2](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Post date:** [July 11, 2013, 11:37pm UTC](https://forum.ansible.com/t/gather-facts-with-check-mode/13106/2 "2013-07-11T23:37:48Z")

</div>

Hmm, the ec2 facts module simply needs to add “supports\_check\_mode” to it’s constructor.

Please file a ticket on this one!

This is true of all other Python modules as well, the core setup module already does this, so it’s a 1 line fix.

Thanks for the heads up and be sure to file the ticket! 🙂

---

<div class="post-metadata">

**Author:** ![Paul\_Hassinger](https://avatars.discourse-cdn.com/v4/letter/p/97f17d/32.png) [@Paul\_Hassinger](https://forum.ansible.com/u/Paul_Hassinger)\
**Post date:** [July 11, 2013, 11:46pm UTC](https://forum.ansible.com/t/gather-facts-with-check-mode/13106/3 "2013-07-11T23:46:20Z")

</div>

Thank you, issue filed at:

[https://github.com/ansible/ansible/issues/3506](https://github.com/ansible/ansible/issues/3506)
