# Set fact for another group in playbook

**URL:** <https://forum.ansible.com/t/set-fact-for-another-group-in-playbook/18092>\
**Category:** Ansible Project\
**Tags:** ansible-project\
**Created:** [April 27, 2015, 1:50am UTC](https://forum.ansible.com/t/set-fact-for-another-group-in-playbook/18092 "2015-04-27T01:50:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jason\_DeTiberus](https://avatars.discourse-cdn.com/v4/letter/j/43a26b/32.png) [@Jason\_DeTiberus](https://forum.ansible.com/u/Jason_DeTiberus)\
**Post date:** [April 27, 2015, 1:50am UTC](https://forum.ansible.com/t/set-fact-for-another-group-in-playbook/18092/1 "2015-04-27T01:50:54Z")

</div>

hostvars.localhost.rds\_database

When using register it creates the variable for the host(s) in the play. Also, you need to make sure both plays are occurring within the same playbook run.
