# Referencing a fact that contains a dot

**URL:** <https://forum.ansible.com/t/referencing-a-fact-that-contains-a-dot/27866>\
**Category:** Ansible Project\
**Created:** [June 25, 2018, 7:18pm UTC](https://forum.ansible.com/t/referencing-a-fact-that-contains-a-dot/27866 "2018-06-25T19:18:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![John\_Harmon](https://avatars.discourse-cdn.com/v4/letter/j/edb3f5/32.png) [@John\_Harmon](https://forum.ansible.com/u/John_Harmon)\
**Post date:** [June 25, 2018, 7:18pm UTC](https://forum.ansible.com/t/referencing-a-fact-that-contains-a-dot/27866/1 "2018-06-25T19:18:43Z")

</div>

Here is a fact list that has been returned. I wish to reference the value of net.ifnames, but due to the dot I keep getting undefined variable. What is the proper way to reference this particular fact? I have tried escaping the dot, double-quoting, single quoting, , and so on.

`  
“ansible\_cmdline”: {  
“BOOT\_IMAGE”: “/vmlinuz-3.10.0-693.el7.x86\_64”,  
“biosdevname”: “0”,  
“crashkernel”: “auto”,  
“net.ifnames”: “0”,  
“quiet”: true,  
“rhgb”: true,  
“ro”: true,  
“root”: “UUID=53995842-8f68-475a-9053-10ae5b371124”  
},

`

ie, this works because there is no dot in the parameter name

`

- debug:  
var: ansible\_cmdline.biosdevname

RESULT

ok: [rhel7] =\> {  
“ansible\_cmdline.biosdevname”: “0”  
}

`

Sample failure

`

---

<div class="post-metadata">

**Author:** ![felixfontein](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/felixfontein/32/7530_2.png) [@felixfontein](https://forum.ansible.com/u/felixfontein)\
**Post date:** [June 25, 2018, 7:22pm UTC](https://forum.ansible.com/t/referencing-a-fact-that-contains-a-dot/27866/2 "2018-06-25T19:22:31Z")

</div>

Hi,

> ie, this works because there is no dot in the parameter name  
> - debug:  
> &nbsp;&nbsp;&nbsp;&nbsp;var: ansible\_cmdline.biosdevname
> 
> RESULT
> 
> ok: [rhel7] =\> {  
> &nbsp;&nbsp;&nbsp;&nbsp;"ansible\_cmdline.biosdevname": "0"  
> }
> 
> Sample failure  
> \*  
> ok: [rhel7] =\> {  
> &nbsp;&nbsp;&nbsp;&nbsp;"ansible\_cmdline.net.ifnames": "VARIABLE IS NOT DEFINED!"  
> }

Have you tried:

&nbsp;&nbsp;&nbsp;&nbsp;debug:  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var: "ansible\_cmdline['net.ifnames']"

?

Cheers,  
Felix

---

<div class="post-metadata">

**Author:** ![John\_Harmon](https://avatars.discourse-cdn.com/v4/letter/j/edb3f5/32.png) [@John\_Harmon](https://forum.ansible.com/u/John_Harmon)\
**Post date:** [June 25, 2018, 7:27pm UTC](https://forum.ansible.com/t/referencing-a-fact-that-contains-a-dot/27866/3 "2018-06-25T19:27:41Z")

</div>

Seems like I tried everything but that. Thank you, it works now.
