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

Click here to read more about DevOps
Click here to read more about Insurance

Related questions

0 votes
asked Jun 9, 2020 in C Plus Plus by Robindeniel
0 votes
asked Oct 5, 2020 in Web Hosting by Robindeniel
0 votes
asked Oct 3, 2020 in Web Hosting by Robindeniel
0 votes
asked Jul 10, 2020 in Sql by SakshiSharma
+1 vote
asked Dec 5, 2019 in DevOps by rajeshsharma
...