in DevOps by (32.2k points)
How to access variable names in Ansible?

1 Answer

0 votes
by (23.9k points)

Using hostvars method we can access and add the variables like below

{{ hostvars[inventory_hostname][‘ansible_’ + which_interface][‘ipv4’][‘address’] }}

Related questions

+1 vote
asked May 8, 2020 in Ansible by SakshiSharma (32.2k points)
...