Ansible Exportd Job: Export referenced objects

Hi Community,

One more question about referencing and exportd jobs for Ansible.
But I think it is not Ansible specific, it’s more a generic exportd question.

I have a type server object, which could have been referenced in multiple type disk objects.
In exportd, I do like to have all field from object server and all fields from referenced disks.

Type Server

  • Name: demoserver.contoso.local
  • OS: Windows Server 2019
  • Status: Active

Type Disks

  • Label: System
  • Size: 50
  • Driveletter: C
  • Server: Reference Field to Server demoserver.contoso.local

Type Disks

  • Label: Data
  • Size: 100
  • Driveletter: D
  • Server: Reference Field to Server demoserver.contoso.local

Expected exportd result:

{
   "all":{
      "hosts":[
         "p-vm-rdck-001"
      ]
   },
   "_meta":{
      "hostvars":{
         "p-vm-rdck-001":{
            "status":"active",
            "osname":"Windows Server 2019 Datacenter",
            "inv_disks": [
                {
                    "C": {
                        "size": 50,
                        "label": "system"
                    },
                    "D": {
                        "capacity_gb": 100,
                        "label": "data"
                    }
                }
            ]
         }
      }
   }
}

Any advice how to achive this, if it’s possible?

Thanks,
Oliver

Hello @rooso ,

I hope these following entries can help you.

With best regards

DATAGERRY - Team

1 Like