# Register Variable /Setfacts and use it in Jinja2

**URL:** <https://forum.ansible.com/t/register-variable-setfacts-and-use-it-in-jinja2/37261>\
**Category:** Ansible Project\
**Created:** [October 24, 2022, 10:55am UTC](https://forum.ansible.com/t/register-variable-setfacts-and-use-it-in-jinja2/37261 "2022-10-24T10:55:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jatashankar\_Mishra](https://avatars.discourse-cdn.com/v4/letter/j/5e9695/32.png) [@Jatashankar\_Mishra](https://forum.ansible.com/u/Jatashankar_Mishra)\
**Post date:** [October 24, 2022, 10:55am UTC](https://forum.ansible.com/t/register-variable-setfacts-and-use-it-in-jinja2/37261/1 "2022-10-24T10:55:13Z")

</div>

Hello team,

I am trying to register variable /setfacts and use it in jinja2 template for printing the output but it says variable not define , Please can yo suggest something what is missing  
========================Playbook =====================
