I am a Network Engineer and Ansible is relative new for me.
At the moment I am trying to build a template with "JSON" as source. See below.
The template should do the follwing (hopefully you get the idea).
Can someone point my to a good sample or documentation.
{
"all_hosts_unique":
[
  "host01",
  "host02"
],
"host_with_properties":
[
  {
    "HOST_NAME": "host01",
    "INT_LIST": [
      {
        "beid": "100",
        "dot1qid": "10",
        Â
      },
      {
        "beid": "100",
        "dot1qid": "11",
        "hsrp_ip": "10.10.20.1",
        "int_be_desc": "test",
        "int_phy01": "TenGigE0/0/0/3",
        "int_phy01_desc": "test02",
        "int_phy02": "TenGigE0/0/0/4",
        "int_phy02_desc": "test03",
        "int_sub_desc": "test",
        "int_sub_ip": "10.10.20.11",
        "int_sub_net": "255.255.255.0",
        "int_sub_vrf": "mgt-net"
      },
      {
        "beid": "100",
        "dot1qid": "12",
        "hsrp_ip": "10.10.30.1",
        "int_be_desc": "test",
        "int_phy01": "TenGigE0/0/0/5",
        "int_phy01_desc": "test03",
        "int_phy02": "TenGigE0/0/0/6",
        "int_phy02_desc": "test04",
        "int_sub_desc": "test",
        "int_sub_ip": "10.10.30.12",
        "int_sub_net": "255.255.255.0",
        "int_sub_vrf": "mgt-net"
      }
    ]
  },
  {
    "HOST_NAME": "host02",
    "INT_LIST": [
      {
        "beid": "111",
        "dot1qid": "10",
        "hsrp_ip": "10.10.10.1",
        "int_be_desc": "test",
        "int_phy01": "TenGigE0/0/0/7",
        "int_phy01_desc": "test01",
        "int_phy02": "TenGigE0/0/0/2",
        "int_phy02_desc": "test02",
        "int_sub_desc": "test",
        "int_sub_ip": "10.10.10.10",
        "int_sub_net": "255.255.255.0",
        "int_sub_vrf": "mgt-net"
      },
      {
        "beid": "222",
        "dot1qid": "11",
        "hsrp_ip": "10.10.20.1",
        "int_be_desc": "test",
        "int_phy01": "TenGigE0/0/0/8",
        "int_phy01_desc": "test02",
        "int_phy02": "TenGigE0/0/0/4",
        "int_phy02_desc": "test03",
        "int_sub_desc": "test",
        "int_sub_ip": "10.10.20.11",
        "int_sub_net": "255.255.255.0",
        "int_sub_vrf": "bla-net"
      },
      {
        "beid": "333",
        "dot1qid": "12",
        "hsrp_ip": "10.10.30.1",
        "int_be_desc": "test",
        "int_phy01": "TenGigE0/0/0/9",
        "int_phy01_desc": "test03",
        "int_phy02": "TenGigE0/0/0/6",
        "int_phy02_desc": "test04",
        "int_sub_desc": "test",
        "int_sub_ip": "10.10.30.12",
        "int_sub_net": "255.255.255.0",
        "int_sub_vrf": "gu-net"
      }
    ]
  }
]
}