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 fromtemplating *

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"?  

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/46f094f4-e5a6-4612-b597-0bcc4eba36b9n%40googlegroups.com.

Reply via email to