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

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’] }}

Related questions

+1 vote
asked Jun 13, 2019 in C Plus Plus by Derya
0 votes
asked Jul 30, 2021 in Ansible by DavidAnderson
0 votes
asked Nov 13, 2019 in Ansible by rajeshsharma
...