I'm using ansible to install a cassandra cluster.  Cassandra wants ip 
addresses and not hostnames in it's config file.  I need to get the ip 
address for each host.  The problem is each physical server has multiple ip 
addresses associated with it.  So I can't just get the ip address using 
ansible_eth0["ipv4"]["address"].  That will not be the correct ip address 
for the related host.  The only var that has the correct ip I need is 
SSH_CONNECTION.  But that is a string that has the source ip and port and 
the dest ip and port.  The dest ip is the ip I need.  Can I parse this 
string and get the ip I need or is there another way to get the ip address?

I also need to get the ip address for the first host and make it available 
for use in a template applied to the remaining hosts.


-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/4362e66a-f2ff-4987-bf59-2ced0ab19b4f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to