---
all:
children:
location1:
children:
debian:
hosts:
server1:
ansible_host: 192.168.0.1
ansible_user: root
vars:
ansible_ssh_common_args: '-o ProxyCommand="ssh -W %h:%p -q root@10.0.0.1"'
location2:
children:
debian:
hosts:
server2:
ansible_host: 192.168.0.2
ansible_user: root
{
"_meta": {
"hostvars": {
"server1": {
"ansible_host": "192.168.0.1",
"ansible_ssh_common_args": "-o ProxyCommand=\"ssh -W %h:%p -q root@10.0.0.1\"",
"ansible_user": "root"
},
"server2": {
"ansible_host": "192.168.0.2",
"ansible_ssh_common_args": "-o ProxyCommand=\"ssh -W %h:%p -q root@10.0.0.1\"",
"ansible_user": "root"
}
}
},
"all": {
"children": [
"location1",
"location2",
"ungrouped"
]
},
"debian": {
"hosts": [
"server1",
"server2"
]
},
"location1": {
"children": [
"debian"
]
},
"location2": {
"children": [
"debian"
]
}
}
---
all:
children:
location1:
children:
debian1:
hosts:
server1:
ansible_host: 192.168.0.1
ansible_user: root
vars:
ansible_ssh_common_args: '-o ProxyCommand="ssh -W %h:%p -q root@10.0.0.1"'
location2:
children:
debian2:
hosts:
server2:
ansible_host: 192.168.0.2
ansible_user: root