Re: [ansible-project] problem to fetch value from var files
On 27.06.2019 11:17, Eric Chang wrote: - name: get user from yml debug: msg: "{{ ch['client_hosts']['abc.com']}}" ok: [dc053.abc.com] => { "msg": [ { "host": "dc026", "ipv4": "192.168.11.26", "iuser": "True", "user": [
[ansible-project] problem to fetch value from var files
I have a yml file named: client_hosts.yml it looks like below client_hosts: > abc.com: > - host: dc021 > ipv4: 192.168.11.21 > - host: dc022 > ipv4: 192.168.11.22 > - host: dc023 > ipv4: 192.168.11.23 > iuser: True > user: john > - host: dc024 > ipv4: 192.168.11.2