Skip to content

Instantly share code, notes, and snippets.

@ganeshrn
Created September 30, 2020 14:10
Show Gist options
  • Save ganeshrn/afd69053d053fd4a5ab586dca295bd35 to your computer and use it in GitHub Desktop.
Save ganeshrn/afd69053d053fd4a5ab586dca295bd35 to your computer and use it in GitHub Desktop.
interfac_cfg
intf_config = {
"interfaces": {
"interface": [
{
"config": {
"description": "configured by Ansible - 1",
"enabled": "True",
"loopback-mode": "False",
"mtu": "1024",
"name": "loopback0000",
"type": "eth"
},
"hold-time": {
"config": {
"down": "0",
"up": "0"
}
},
"name": "loopback0000",
"subinterfaces": {
"subinterface": [
{
"config": {
"description": "subinterface configured by Ansible",
"enabled": "True",
"index": "5"
},
"index": "5"
},
{
"config": {
"description": "subinterface configured by Ansible",
"enabled": "False",
"index": "2"
},
"index": "2"
},
]
}
},
{
"config": {
"description": "configured by Ansible - 2",
"enabled": "False",
"loopback-mode": "False",
"mtu": "2048",
"name": "loopback1111",
"type": "virt"
},
"hold-time": {
"config": {
"down": "1",
"up": "0"
}
},
"name": "loopback1111",
"subinterfaces": {
"subinterface": [
{
"config": {
"description": "subinterface configured by Ansible",
"enabled": "True",
"index": "10"
},
"index": "10"
},
{
"config": {
"description": "subinterface configured by Ansible",
"enabled": "False",
"index": "3"
},
"index": "3"
},
]
}
}
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment