# Group within another group issues

**URL:** <https://forum.ansible.com/t/group-within-another-group-issues/18857>\
**Category:** Ansible Project\
**Created:** [July 26, 2015, 2:31pm UTC](https://forum.ansible.com/t/group-within-another-group-issues/18857 "2015-07-26T14:31:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![William\_Muriithi](https://avatars.discourse-cdn.com/v4/letter/w/6de8d8/32.png) [@William\_Muriithi](https://forum.ansible.com/u/William_Muriithi)\
**Post date:** [July 26, 2015, 2:31pm UTC](https://forum.ansible.com/t/group-within-another-group-issues/18857/1 "2015-07-26T14:31:35Z")

</div>

Hello

I have an inventory set as follows:

[develop]  
192.168.0.1 \<- tomcat  
192.168.0.2 \<- tomcat  
192.168.0.10 \<- mysql Galera cluster  
192.168.0.11 \<- mysql Galera cluster  
192.168.0.12 \<- mysql Galera cluster

[qa]  
192.168.1.1 \<- tomcat  
192.168.1.2 \<- tomcat  
192.168.1.10 \<- mysql Galera cluster  
192.168.1.11 \<- mysql Galera cluster  
192.168.1.12 \<- mysql Galera cluster

Now, what I am trying to do is to set up tomcat database details  
dynamically through host facts. Ansible can tell which system is a  
mysql server and what is a tomcat server through custom facts. The IP  
in the inventory are management IP (Used only to ssh in), all systems  
do have a second payload interface (To which the iptables allow mysql  
connections)

My question is, how would you go about extracting the payload IP  
(Second interface) from the database systems so that ansible can plug  
them in tomcat context.xml?

Regards,

William
