in DevOps by
Q:
How to access variable names in Ansible?

▼ Show 1 Answer

0 votes
by

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

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

DevOps
Learn More with Madanswer
...