# The lookup \`vars\` was found, however lookups were disabled from templating

**URL:** <https://forum.ansible.com/t/the-lookup-vars-was-found-however-lookups-were-disabled-from-templating/36286>\
**Category:** Ansible Project\
**Tags:** windows\
**Created:** [February 3, 2022, 2:51pm UTC](https://forum.ansible.com/t/the-lookup-vars-was-found-however-lookups-were-disabled-from-templating/36286 "2022-02-03T14:51:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![n-du\_fox](https://avatars.discourse-cdn.com/v4/letter/n/f9ae1b/32.png) [@n-du\_fox](https://forum.ansible.com/u/n-du_fox)\
**Post date:** [February 3, 2022, 2:51pm UTC](https://forum.ansible.com/t/the-lookup-vars-was-found-however-lookups-were-disabled-from-templating/36286/1 "2022-02-03T14:51:59Z")

</div>

Hi

Im using a [constructed inventory](https://docs.ansible.com/ansible/latest/collections/ansible/builtin/constructed_inventory.html) to create some groups, based on data from a dynamic inventory

while this works:  
plugin: constructed  
strict: True

groups:  
linux: “‘linux’ in (RuntimeSystem | lower)”  
windows: “‘windows’ in (RuntimeSystem | lower)”  
appliance: Appliance

extending this wirh:

compose:  
vCluster: lookup(‘vars’, ClusterId)

fails with error:  
The lookup `vars` was found, **however lookups were disabled from**  
**templating**

similar error if i lookup dict

ansible-inventory --host hostname looks like this

{  
“cce46210-a27f-479b-8725-eced50022123”: {  
“Action”: “None”,  
“CollectionId”: “9019fe01-e8c9-4b5f-b1e0-e4f168452cd7”,  
“DataCenterId”: “49a50761-b3e5-45c7-8c07-32162935eb97”,  
“Description”: “Test Cluster mit dem Alten Cisco UCS Intel Server”,  
“Id”: “cce46210-a27f-479b-8725-eced50022123”,  
“Name”: “server\_intel”,  
“Prefix”: “CL\_”,  
“SetState”: “present”,  
“Status”: “Ready”  
},  
“Action”: “None”,  
“ClusterId”: “cce46210-a27f-479b-8725-eced50022123”,  
“Description”: “”,  
“Hostname”: “tst02-003-ctdev”,  
“Id”: “31dee9ec-b2a4-4d06-a483-993b087f2403”,  
“PowerState”: 1,  
“RuntimeSystem”: “Windows\_x64”,  
“SetPowerState”: 1,  
“SetState”: “present”,  
}

How can i get details of the cluster in a constructed inventory or do i have to write an inventory script which does the “magic”?
