# Issues with dynamic  variables and ansible\_facts

**URL:** <https://forum.ansible.com/t/issues-with-dynamic-variables-and-ansible-facts/32602>\
**Category:** Ansible Developer\
**Created:** [April 5, 2020, 7:24pm UTC](https://forum.ansible.com/t/issues-with-dynamic-variables-and-ansible-facts/32602 "2020-04-05T19:24:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![C11](https://avatars.discourse-cdn.com/v4/letter/c/71e660/32.png) [@C11](https://forum.ansible.com/u/C11)\
**Post date:** [April 5, 2020, 7:24pm UTC](https://forum.ansible.com/t/issues-with-dynamic-variables-and-ansible-facts/32602/1 "2020-04-05T19:24:01Z")

</div>

Good morning

Im trying to obtain a dynamic variable ina ansible2.9.1 environment

What i would like to obtain is the content of a “double moustache” which i know it doesn’t work . The problem is that, when i try to obtain its contents with **lookup** o **hostvars** I receive an error.  
I think it could be because the variable i want to gather is a ansible\_fact one

How could i retreive it ?

This is the information about my environment & code

**=== ansble facts ===**  
alone.pamplona.name | SUCCESS =\> {  
“ansible\_facts”: {  
“ansible\_local”: {  
“databases”: {  
“FAKE1”: {  
“activo”: “false”,  
“oracle\_home”: “/u01/app/oracle/product/12.1/dbhome1”,  
“oracle\_sid”: “FAKE1”  
},  
“FAKE2”: {  
“activo”: “false”,  
“oracle\_home”: “/u01/app/oracle/product/19.3/dbhome2”,  
“oracle\_sid”: “FAKE2”  
},  
“TEST12FS”: {  
“activo”: “true”,  
“oracle\_home”: “/u01/app/oracle/product/12.1/dbhome1”,  
“oracle\_sid”: “TEST12FS”  
},  
“TEST19”: {  
“activo”: “true”,  
“oracle\_home”: “/u01/app/oracle/product/19.3/dbhome1”,  
“oracle\_sid”: “TEST19”  
}  
},  
},
