# How gather additional facts by the role?

**URL:** <https://forum.ansible.com/t/how-gather-additional-facts-by-the-role/17809>\
**Category:** Ansible Project\
**Created:** [March 23, 2015, 8:22am UTC](https://forum.ansible.com/t/how-gather-additional-facts-by-the-role/17809 "2015-03-23T08:22:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jan\_Koprowski](https://avatars.discourse-cdn.com/v4/letter/j/c5a1d2/32.png) [@Jan\_Koprowski](https://forum.ansible.com/u/Jan_Koprowski)\
**Post date:** [March 23, 2015, 8:22am UTC](https://forum.ansible.com/t/how-gather-additional-facts-by-the-role/17809/1 "2015-03-23T08:22:57Z")

</div>

Hi,

Often, running part of the role using --tags or --start-at-task I need information gathered by previous tasks.

I thought that gathering information e.g. all available gpg keys should not be task but part of ‘gathering facts’.

I’ve already read about tag ‘always’ and probably I can use it to design my role to gather ‘facts’ even when --tags is present.  
However, can I somehow ‘register’ gathering additional information by the role and access them later making it every time regardless of --tags or --start-at-task?

Regards,

Jan

---

<div class="post-metadata">

**Author:** ![Brian\_Coca](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Post date:** [March 23, 2015, 2:52pm UTC](https://forum.ansible.com/t/how-gather-additional-facts-by-the-role/17809/2 "2015-03-23T14:52:34Z")

</div>

you want the setup module:

- setup:

it is what gather\_facts actually uses.

---

<div class="post-metadata">

**Author:** ![Jan\_Koprowski](https://avatars.discourse-cdn.com/v4/letter/j/c5a1d2/32.png) [@Jan\_Koprowski](https://forum.ansible.com/u/Jan_Koprowski)\
**Post date:** [March 30, 2015, 7:00am UTC](https://forum.ansible.com/t/how-gather-additional-facts-by-the-role/17809/3 "2015-03-30T07:00:46Z")

</div>

I’ve found local facts: [http://docs.ansible.com/playbooks\_variables.html#local-facts-facts-d](http://docs.ansible.com/playbooks_variables.html#local-facts-facts-d)

W dniu poniedziałek, 23 marca 2015 15:53:03 UTC+1 użytkownik Brian Coca napisał:
