1
---
- name: "Gateway Checker"
hosts: vms_windows
gather_facts: True
tasks:
- debug: var=ansible_interfaces
使用获取我:找回Windows主机的默认网关使用PowerShell脚本
TASK [debug] *******************************************************************
ok: [dc00.domain.test] => {
"ansible_interfaces": [
{
"default_gateway": "192.168.10.254",
"dns_domain": null,
"interface_index": 12,
"interface_name": "Intel(R) PRO/1000 MT Network Connection"
}
]
}
但去为:
- debug: var=ansible_interfaces.default_gateway
获取我:
"ansible_interfaces.default_gateway": "VARIABLE IS NOT DEFINED!"
任何想法上我可能在这里做错了什么?