Hi
Im using a constructed inventory 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”?