Ansible:按其属性筛选列表我在Ansible中注册了名为“Network”的变量:{
"addresses": {
"private_ext": [
{
"type": "fixed",
"addr": "172.16.2.100"
}
],
"private_man": [
{
"type": "fixed",
"addr": "172.16.1.100"
},
{
"type": "floating",
"addr": "10.90.80.10"
}
]
}
}是否有可能得到这样的IP地址(“addr”)类型=“浮动”?- debug: var={{ network.addresses.private_man | filter type="fixed" | get "addr" }}我知道语法是错的,但你明白。
添加回答
举报
0/150
提交
取消